From 020e4cd92d29cde146f50ffa377dd530ebbb6d3f Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 19:57:03 +0000 Subject: [PATCH 01/40] [Windows / SQL CE] baselines --- ...lAnyTests.All4Async(SqlCe.LinqService).sql | 17 ++ ...Tests.GroupBy2Async(SqlCe.LinqService).sql | 30 +++ ...syncEnumerable1Test(SqlCe.LinqService).sql | 9 + ...syncEnumerable2Test(SqlCe.LinqService).sql | 11 + ...EnumerableCast1Test(SqlCe.LinqService).sql | 9 + ...EnumerableCast2Test(SqlCe.LinqService).sql | 11 + ...s.ContainsAsyncTest(SqlCe.LinqService).sql | 17 ++ ...ests.FirstAsyncTest(SqlCe.LinqService).sql | 14 ++ ...cTests.TakeSkipTest(SqlCe.LinqService).sql | 16 ++ ....TestFirstOrDefault(SqlCe.LinqService).sql | 19 ++ ...s.ToLookupAsyncTest(SqlCe.LinqService).sql | 21 ++ ...kupElementAsyncTest(SqlCe.LinqService).sql | 21 ++ ...eTests.AnyTestAsync(SqlCe.LinqService).sql | 38 ++++ ...Tests.AnyTestAsync2(SqlCe.LinqService).sql | 38 ++++ ...sionMethoAsyncdTest(SqlCe.LinqService).sql | 15 ++ ....CompiledTest3Async(SqlCe.LinqService).sql | 26 +++ ...s.ContainsTestAsync(SqlCe.LinqService).sql | 34 +++ ...ests.CountTestAsync(SqlCe.LinqService).sql | 24 ++ ...sts.CountTestAsync2(SqlCe.LinqService).sql | 24 ++ ...s.ElementTestAsync1(SqlCe.LinqService).sql | 26 +++ ...s.ElementTestAsync2(SqlCe.LinqService).sql | 26 +++ ...eTests.MaxTestAsync(SqlCe.LinqService).sql | 24 ++ ...Tests.MaxTestAsync2(SqlCe.LinqService).sql | 24 ++ ...c.AnyPredicateAsync(SqlCe.LinqService).sql | 175 ++------------ ...CountPredicateAsync(SqlCe.LinqService).sql | 168 +------------- ...faultPredicateAsync(SqlCe.LinqService).sql | 169 +------------- ...FirstPredicateAsync(SqlCe.LinqService).sql | 169 +------------- ...CountPredicateAsync(SqlCe.LinqService).sql | 168 +------------- ...nc.MaxSelectorAsync(SqlCe.LinqService).sql | 168 +------------- ...nc.MinSelectorAsync(SqlCe.LinqService).sql | 168 +------------- ...faultPredicateAsync(SqlCe.LinqService).sql | 169 +------------- ...inglePredicateAsync(SqlCe.LinqService).sql | 169 +------------- ...nTests.Concat1Async(SqlCe.LinqService).sql | 19 ++ ...tAutoIncrementAsync(SqlCe.LinqService).sql | 97 ++++++++ ...s.TestFilteredAsync(SqlCe.LinqService).sql | 84 +++++++ ...ntTests.Count1Async(SqlCe.LinqService).sql | 8 + ...ntTests.Count2Async(SqlCe.LinqService).sql | 10 + ...s.SubQueryMax1Async(SqlCe.LinqService).sql | 17 ++ ...umnsTests.Issue4602(SqlCe.LinqService).sql | 48 +--- ...sts.Issue4057_Async(SqlCe.LinqService).sql | 29 +++ ...ExplicitTransaction(SqlCe.LinqService).sql | 29 +++ ...thodExpressionAsync(SqlCe.LinqService).sql | 26 +++ ...nceTests.Cast1Async(SqlCe.LinqService).sql | 11 + ...ceTests.Test18Async(SqlCe.LinqService).sql | 14 ++ ...sts.Parameter1Async(SqlCe.LinqService).sql | 6 + ...Tests.Issue3132Test(SqlCe.LinqService).sql | 213 ++++++++++++++++++ ...ementAt2Async(SqlCe.LinqService,False).sql | 16 ++ ...lementAt2Async(SqlCe.LinqService,True).sql | 16 ++ ...Default3Async(SqlCe.LinqService,False).sql | 16 ++ ...tDefault3Async(SqlCe.LinqService,True).sql | 16 ++ ....MultipleSkip1Async(SqlCe.LinqService).sql | 83 +------ ...ts.Take1Async(SqlCe.LinqService,False).sql | 18 ++ ...sts.Take1Async(SqlCe.LinqService,True).sql | 22 ++ ...ts.Take2Async(SqlCe.LinqService,False).sql | 11 + ...sts.Take2Async(SqlCe.LinqService,True).sql | 11 + ...ts.Take3Async(SqlCe.LinqService,False).sql | 11 + ...sts.Take3Async(SqlCe.LinqService,True).sql | 13 ++ ...ts.Take4Async(SqlCe.LinqService,False).sql | 11 + ...sts.Take4Async(SqlCe.LinqService,True).sql | 13 ++ ...ts.Take5Async(SqlCe.LinqService,False).sql | 9 + ...sts.Take5Async(SqlCe.LinqService,True).sql | 11 + ...c(SqlCe.LinqService,False,False,False).sql | 16 ++ ...nc(SqlCe.LinqService,False,False,True).sql | 16 ++ ...nc(SqlCe.LinqService,False,True,False).sql | 16 ++ ...ync(SqlCe.LinqService,False,True,True).sql | 16 ++ ...nc(SqlCe.LinqService,True,False,False).sql | 16 ++ ...ync(SqlCe.LinqService,True,False,True).sql | 16 ++ ...ync(SqlCe.LinqService,True,True,False).sql | 16 ++ ...sync(SqlCe.LinqService,True,True,True).sql | 16 ++ ...s.CreateTable1Async(SqlCe.LinqService).sql | 34 +++ ...ts.CreateTableAsync(SqlCe.LinqService).sql | 30 +++ ...eteByTableNameAsync(SqlCe.LinqService).sql | 88 ++++++++ ...tTests.Insert2Async(SqlCe.LinqService).sql | 44 ++++ ...tTests.Insert3Async(SqlCe.LinqService).sql | 46 ++++ ...tTests.Insert4Async(SqlCe.LinqService).sql | 46 ++++ ...ertByTableNameAsync(SqlCe.LinqService).sql | 69 ++++++ ...sertOrReplace1Async(SqlCe.LinqService).sql | 73 ++++++ ...aceByTableNameAsync(SqlCe.LinqService).sql | 129 +++++++++++ ...nsertOrUpdate3Async(SqlCe.LinqService).sql | 71 ++++++ ...sertOrUpdate3xAsync(SqlCe.LinqService).sql | 71 ++++++ ...tWithIdentity1Async(SqlCe.LinqService).sql | 14 ++ ...tWithIdentity2Async(SqlCe.LinqService).sql | 14 ++ ...tWithIdentity4Async(SqlCe.LinqService).sql | 32 +++ ...eTests.Update1Async(SqlCe.LinqService).sql | 54 +++++ ...eTests.Update2Async(SqlCe.LinqService).sql | 54 +++++ ...eTests.Update4Async(SqlCe.LinqService).sql | 63 ++++++ ...teAssociation1Async(SqlCe.LinqService).sql | 47 ++++ ...ssociation1AsyncOld(SqlCe.LinqService).sql | 47 ++++ ...ateByTableNameAsync(SqlCe.LinqService).sql | 105 +++++++++ ...UpdateComplex1Async(SqlCe.LinqService).sql | 55 +++++ .../Tests.Linq.AsyncTests.Test(SqlCe).sql | 18 ++ .../Tests.Linq.AsyncTests.Test1(SqlCe).sql | 9 + ...sts.Linq.AsyncTests.TestForEach(SqlCe).sql | 9 + 93 files changed, 2722 insertions(+), 1533 deletions(-) create mode 100644 SqlCe.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlCe.LinqService,False).sql create mode 100644 SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlCe.LinqService,True).sql create mode 100644 SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlCe.LinqService,False).sql create mode 100644 SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlCe.LinqService,True).sql create mode 100644 SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlCe.LinqService,False).sql create mode 100644 SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlCe.LinqService,True).sql create mode 100644 SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlCe.LinqService,False).sql create mode 100644 SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlCe.LinqService,True).sql create mode 100644 SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlCe.LinqService,False).sql create mode 100644 SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlCe.LinqService,True).sql create mode 100644 SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlCe.LinqService,False).sql create mode 100644 SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlCe.LinqService,True).sql create mode 100644 SqlCe.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlCe.LinqService).sql create mode 100644 SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlCe.LinqService).sql create mode 100644 SqlCe/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlCe).sql create mode 100644 SqlCe/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlCe).sql create mode 100644 SqlCe/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlCe).sql diff --git a/SqlCe.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..4db22783450b --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlCe.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ) + THEN 1 + ELSE 0 + END as [c1] + diff --git a/SqlCe.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..f257382a782b --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlCe.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID] as [ParentID_1], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlCe.LinqService).sql new file mode 100644 index 000000000000..6a74937b9358 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlCe.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlCe.LinqService).sql new file mode 100644 index 000000000000..53fe1905f866 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlCe.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlCe.LinqService).sql new file mode 100644 index 000000000000..6a74937b9358 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlCe.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlCe.LinqService).sql new file mode 100644 index 000000000000..53fe1905f866 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlCe.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlCe.LinqService).sql new file mode 100644 index 000000000000..cd58be9da2cd --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlCe.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ) + THEN 1 + ELSE 0 + END as [c1] + diff --git a/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlCe.LinqService).sql new file mode 100644 index 000000000000..e6cc1b46bcd0 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlCe.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID] as [ID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlCe.LinqService).sql index c20032f734bf..a51f87800268 100644 --- a/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlCe.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlCe.LinqService).sql new file mode 100644 index 000000000000..e1d08df96eb8 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlCe.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlCe.LinqService).sql new file mode 100644 index 000000000000..44ad633d6e59 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlCe.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlCe.LinqService).sql new file mode 100644 index 000000000000..44ad633d6e59 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlCe.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlCe.LinqService).sql new file mode 100644 index 000000000000..6f987c781291 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlCe.LinqService).sql @@ -0,0 +1,38 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END as [c1] + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END as [c1] + diff --git a/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlCe.LinqService).sql new file mode 100644 index 000000000000..6f987c781291 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlCe.LinqService).sql @@ -0,0 +1,38 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END as [c1] + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END as [c1] + diff --git a/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlCe.LinqService).sql new file mode 100644 index 000000000000..9e5d5d57e41d --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlCe.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..213d02d5c695 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlCe.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlCe.LinqService).sql new file mode 100644 index 000000000000..22871f203d84 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlCe.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END as [c1] + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END as [c1] + diff --git a/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlCe.LinqService).sql new file mode 100644 index 000000000000..5360620b8c34 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlCe.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlCe.LinqService).sql new file mode 100644 index 000000000000..5360620b8c34 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlCe.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlCe.LinqService).sql new file mode 100644 index 000000000000..33ba7f434552 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlCe.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlCe.LinqService).sql new file mode 100644 index 000000000000..33ba7f434552 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlCe.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlCe.LinqService).sql new file mode 100644 index 000000000000..2d5939ed7a41 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlCe.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) as [MAX_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) as [MAX_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlCe.LinqService).sql new file mode 100644 index 000000000000..2d5939ed7a41 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlCe.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) as [MAX_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) as [MAX_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlCe.LinqService).sql index 772d6177964e..6f5de805ca9a 100644 --- a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlCe.LinqService).sql @@ -1,160 +1,19 @@ BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlCe - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ) + THEN 1 + ELSE 0 + END as [c1] diff --git a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlCe.LinqService).sql index 772d6177964e..80a6e4288ccb 100644 --- a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlCe.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlCe - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlCe.LinqService).sql index 772d6177964e..27d1154ce8e4 100644 --- a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlCe.LinqService).sql @@ -1,160 +1,13 @@ BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlCe - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p as [Id], + [c_1].[Id] as [Id_1] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlCe.LinqService).sql index 772d6177964e..27d1154ce8e4 100644 --- a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlCe.LinqService).sql @@ -1,160 +1,13 @@ BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlCe - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p as [Id], + [c_1].[Id] as [Id_1] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlCe.LinqService).sql index 772d6177964e..80a6e4288ccb 100644 --- a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlCe.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlCe - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlCe.LinqService).sql index 772d6177964e..3a4b01c245f4 100644 --- a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlCe.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlCe - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) as [MAX_1] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlCe.LinqService).sql index 772d6177964e..85c91a8a20af 100644 --- a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlCe.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlCe - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) as [MIN_1] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlCe.LinqService).sql index 772d6177964e..36ba43588ada 100644 --- a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlCe.LinqService).sql @@ -1,160 +1,13 @@ BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlCe - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p as [Id], + [c_1].[Id] as [Id_1] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlCe.LinqService).sql index 772d6177964e..36ba43588ada 100644 --- a/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlCe.LinqService).sql @@ -1,160 +1,13 @@ BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlCe - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlCe - -DROP TABLE [AsyncDataTable] +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p as [Id], + [c_1].[Id] as [Id_1] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlCe.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..de931ec6ed4f --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlCe.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlCe.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlCe.LinqService).sql index cf9854d7f913..5557c9a931b5 100644 --- a/SqlCe.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlCe.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlCe SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlCe @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlCe @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlCe @@ -38,6 +111,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyAutoIncrement] +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlCe @@ -48,6 +133,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE FROM + [ConcurrencyAutoIncrement] +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlCe diff --git a/SqlCe.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlCe.LinqService).sql index 927097657e8a..ce9341d23c4d 100644 --- a/SqlCe.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlCe.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlCe SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlCe @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlCe @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlCe @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlCe diff --git a/SqlCe.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..3aab68e247a7 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlCe.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Parent] [t1] + diff --git a/SqlCe.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..895d3308ebb5 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlCe.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlCe.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..315dfe76dc20 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlCe.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) as [MAX_1] +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlCe.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlCe.LinqService).sql index 2575223ddb85..1e0d43515ddf 100644 --- a/SqlCe.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlCe.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- SqlCe - -DROP TABLE [DynamicParent] - -BeforeExecute --- SqlCe - -CREATE TABLE [DynamicParent] -( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY ([ID]) -) - -BeforeExecute --- SqlCe - -DROP TABLE [DynamicChild] - -BeforeExecute --- SqlCe - -CREATE TABLE [DynamicChild] -( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY ([ID]) -) - -BeforeExecute --- SqlCe - -DROP TABLE [DynamicChild] - -BeforeExecute --- SqlCe - -DROP TABLE [DynamicParent] +-- SqlCe (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlCe.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlCe.LinqService).sql index 3fd08087aeb9..5f683faa06af 100644 --- a/SqlCe.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlCe.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID] as [ParentID_1], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlCe (asynchronously) diff --git a/SqlCe.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlCe.LinqService).sql index 9c3f7f24586b..7b379dd44ca1 100644 --- a/SqlCe.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlCe.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID] as [ParentID_1], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlCe (asynchronously) diff --git a/SqlCe.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlCe.LinqService).sql new file mode 100644 index 000000000000..13f267315f5c --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlCe.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[COUNT_1] +FROM + [Parent] [p] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) [t1] + diff --git a/SqlCe.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..c4a2bc90a411 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlCe.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlCe.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..b54275cd6147 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlCe.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = 'F' + diff --git a/SqlCe.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..21661f41ef2a --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlCe.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + 1 as [c1] + diff --git a/SqlCe.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlCe.LinqService).sql new file mode 100644 index 000000000000..401511098d76 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlCe.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [x].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName] as [Key_1], + COUNT(*) as [Count_1] +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlCe.LinqService,False).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlCe.LinqService,False).sql new file mode 100644 index 000000000000..f4d6139863ca --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlCe.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlCe.LinqService,True).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlCe.LinqService,True).sql new file mode 100644 index 000000000000..f4d6139863ca --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlCe.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlCe.LinqService,False).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlCe.LinqService,False).sql new file mode 100644 index 000000000000..f4d6139863ca --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlCe.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlCe.LinqService,True).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlCe.LinqService,True).sql new file mode 100644 index 000000000000..f4d6139863ca --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlCe.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlCe.LinqService).sql index 05231eda758f..8325c5342b76 100644 --- a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlCe.LinqService).sql @@ -1,74 +1,13 @@ BeforeExecute --- SqlCe - -DROP TABLE [TakeSkipClass] - -BeforeExecute --- SqlCe - -CREATE TABLE [TakeSkipClass] -( - [Value] NVarChar(10) NULL -) - -BeforeExecute --- SqlCe -DECLARE @Value NVarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlCe -DECLARE @Value NVarChar(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlCe -DECLARE @Value NVarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlCe -DECLARE @Value NVarChar(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlCe - -DROP TABLE [TakeSkipClass] +-- SqlCe (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] as [Value_1] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlCe.LinqService,False).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlCe.LinqService,False).sql index 2e1e363ad2c8..d165e888fb48 100644 --- a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlCe.LinqService,False).sql +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlCe.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlCe (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlCe.LinqService,True).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlCe.LinqService,True).sql index ee14b2316e2a..8111c65bf0a5 100644 --- a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlCe.LinqService,True).sql +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlCe.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlCe.LinqService,False).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlCe.LinqService,False).sql new file mode 100644 index 000000000000..4f95eae677f6 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlCe.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlCe.LinqService,True).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlCe.LinqService,True).sql new file mode 100644 index 000000000000..4f95eae677f6 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlCe.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlCe.LinqService,False).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlCe.LinqService,False).sql new file mode 100644 index 000000000000..b482cdcb8542 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlCe.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlCe.LinqService,True).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlCe.LinqService,True).sql new file mode 100644 index 000000000000..f4f1d50e31b2 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlCe.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlCe.LinqService,False).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlCe.LinqService,False).sql new file mode 100644 index 000000000000..a0c842ba98c9 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlCe.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlCe.LinqService,True).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlCe.LinqService,True).sql new file mode 100644 index 000000000000..ba09cc5f9ce3 --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlCe.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlCe.LinqService,False).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlCe.LinqService,False).sql new file mode 100644 index 000000000000..3473186e7bfd --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlCe.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlCe.LinqService,True).sql b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlCe.LinqService,True).sql new file mode 100644 index 000000000000..023d316a369e --- /dev/null +++ b/SqlCe.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlCe.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,False,False).sql b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,False,False).sql index 419aae3b263c..f5849dff3918 100644 --- a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,False,False).sql +++ b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlCe (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,False,True).sql b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,False,True).sql index 419aae3b263c..f5849dff3918 100644 --- a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,False,True).sql +++ b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlCe (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,True,False).sql b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,True,False).sql index 419aae3b263c..f5849dff3918 100644 --- a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,True,False).sql +++ b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlCe (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,True,True).sql b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,True,True).sql index 419aae3b263c..f5849dff3918 100644 --- a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,True,True).sql +++ b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,False,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlCe (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,False,False).sql b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,False,False).sql index 419aae3b263c..f5849dff3918 100644 --- a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,False,False).sql +++ b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlCe (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,False,True).sql b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,False,True).sql index 419aae3b263c..f5849dff3918 100644 --- a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,False,True).sql +++ b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlCe (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,True,False).sql b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,True,False).sql index 419aae3b263c..f5849dff3918 100644 --- a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,True,False).sql +++ b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlCe (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,True,True).sql b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,True,True).sql index 419aae3b263c..f5849dff3918 100644 --- a/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,True,True).sql +++ b/SqlCe.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlCe.LinqService,True,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlCe (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/SqlCe.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..1d9f45a735a1 --- /dev/null +++ b/SqlCe.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlCe.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [TestTable] + +BeforeExecute +-- SqlCe (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(255) NULL, + [CreatedOn] DateTime NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlCe.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlCe.LinqService).sql index 88472c8c4276..d46c4efdb8d3 100644 --- a/SqlCe.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlCe.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [TempTable] + +BeforeExecute +-- SqlCe (asynchronously) + +CREATE TABLE [TempTable] +( + [ID] Int NOT NULL +) + +BeforeExecute +-- SqlCe (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlCe SELECT @@ -7,3 +32,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [TempTable] + diff --git a/SqlCe.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlCe.LinqService).sql new file mode 100644 index 000000000000..0eede5967c07 --- /dev/null +++ b/SqlCe.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlCe.LinqService).sql @@ -0,0 +1,88 @@ +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlCe (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] NChar(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY ([PersonID]) +) + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender NVarChar(1) -- String +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + COUNT(*) as [COUNT_1] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID] as [ID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE FROM + [xxPerson] +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + COUNT(*) as [COUNT_1] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..977f4f57ddd9 --- /dev/null +++ b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlCe.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- SqlCe (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlCe (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..f53a22c0dd10 --- /dev/null +++ b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlCe.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlCe (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id as [c1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlCe (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..f53a22c0dd10 --- /dev/null +++ b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlCe.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlCe (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id as [c1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlCe (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlCe.LinqService).sql index 6c13e3d477fe..65f8e38c494e 100644 --- a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlCe.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlCe (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] NChar(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY ([PersonID]) +) + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender NVarChar(1) -- String +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlCe (asynchronously) DECLARE @FirstName NVarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName NVarChar(4) -- String @@ -60,3 +100,32 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + COUNT(*) as [COUNT_1] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + COUNT(*) as [COUNT_1] +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = 'Steven' AND [p].[LastName] = 'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlCe.LinqService).sql index 1393e990e757..8398472ddf70 100644 --- a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlCe.LinqService).sql @@ -34,3 +34,76 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc0' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = @Diagnosis +WHERE + [Patient].[PersonID] = @PersonID + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = @Diagnosis +WHERE + [Patient].[PersonID] = @PersonID + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = @Diagnosis +WHERE + [Patient].[PersonID] = @PersonID + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlCe.LinqService).sql new file mode 100644 index 000000000000..6779479aebc9 --- /dev/null +++ b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlCe.LinqService).sql @@ -0,0 +1,129 @@ +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [xxPatient] + +BeforeExecute +-- SqlCe (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(255) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY ([PersonID]) +) + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +WHERE + [xxPatient].[PersonID] = @PersonID + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO [xxPatient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +WHERE + [xxPatient].[PersonID] = @PersonID + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO [xxPatient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + COUNT(*) as [COUNT_1] +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +WHERE + [xxPatient].[PersonID] = @PersonID + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +WHERE + [xxPatient].[PersonID] = @PersonID + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + COUNT(*) as [COUNT_1] +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [xxPatient] + diff --git a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlCe.LinqService).sql index 1393e990e757..98407e794846 100644 --- a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlCe.LinqService).sql @@ -34,3 +34,74 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([Patient].[Diagnosis]) + @i AS NVarChar(11)) +WHERE + [Patient].[PersonID] = @id + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([Patient].[Diagnosis]) + @i AS NVarChar(11)) +WHERE + [Patient].[PersonID] = @id + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([Patient].[Diagnosis]) + @i AS NVarChar(11)) +WHERE + [Patient].[PersonID] = @id + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlCe.LinqService).sql index 1393e990e757..7f71f9211ee8 100644 --- a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlCe.LinqService).sql @@ -34,3 +34,74 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([Patient].[Diagnosis]) + @i AS NVarChar(11)) +WHERE + [Patient].[PersonID] = @id2 + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([Patient].[Diagnosis]) + @i AS NVarChar(11)) +WHERE + [Patient].[PersonID] = @id2 + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([Patient].[Diagnosis]) + @i AS NVarChar(11)) +WHERE + [Patient].[PersonID] = @id2 + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlCe.LinqService).sql index 7ac9f2ff585d..32804913feae 100644 --- a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlCe.LinqService).sql @@ -27,6 +27,20 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- SqlCe (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID] as [ID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' + BeforeExecute -- SqlCe diff --git a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlCe.LinqService).sql index 7ac9f2ff585d..32804913feae 100644 --- a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlCe.LinqService).sql @@ -27,6 +27,20 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- SqlCe (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID] as [ID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' + BeforeExecute -- SqlCe diff --git a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlCe.LinqService).sql index 18d78df94abb..d870a8bb9227 100644 --- a/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlCe.LinqService).sql @@ -37,6 +37,22 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID] as [ID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' + BeforeExecute -- SqlCe (asynchronously) DECLARE @FirstName NVarChar(5) -- String @@ -68,6 +84,22 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID] as [ID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' + BeforeExecute -- SqlCe diff --git a/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..0bc65fde7fcb --- /dev/null +++ b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlCe.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..0bc65fde7fcb --- /dev/null +++ b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlCe.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..ba85c1adb0c8 --- /dev/null +++ b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlCe.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [Child] +SET + [ChildID] = [Child].[ChildID] + 1 +WHERE + EXISTS( + SELECT + * + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [c_1].[ChildID] = @id AND + [a_Parent].[Value1] = 1 AND + [Child].[ParentID] = [c_1].[ParentID] AND + [Child].[ChildID] = [c_1].[ChildID] + ) + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) as [COUNT_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlCe.LinqService).sql new file mode 100644 index 000000000000..e66c7012c23c --- /dev/null +++ b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlCe.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- SqlCe (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlCe (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlCe (asynchronously) + +UPDATE + [Parent] +SET + [Value1] = 5 +WHERE + EXISTS( + SELECT + * + FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [child_1].[ChildID] = 10000 AND [Parent].[ParentID] = [a_Parent].[ParentID] AND + ([Parent].[Value1] = [a_Parent].[Value1] OR [Parent].[Value1] IS NULL AND [a_Parent].[Value1] IS NULL) + ) + diff --git a/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlCe.LinqService).sql new file mode 100644 index 000000000000..e66c7012c23c --- /dev/null +++ b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlCe.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- SqlCe (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlCe (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlCe (asynchronously) + +UPDATE + [Parent] +SET + [Value1] = 5 +WHERE + EXISTS( + SELECT + * + FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [child_1].[ChildID] = 10000 AND [Parent].[ParentID] = [a_Parent].[ParentID] AND + ([Parent].[Value1] = [a_Parent].[Value1] OR [Parent].[Value1] IS NULL AND [a_Parent].[Value1] IS NULL) + ) + diff --git a/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlCe.LinqService).sql new file mode 100644 index 000000000000..c27c7168534e --- /dev/null +++ b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlCe.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlCe (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] NChar(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY ([PersonID]) +) + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender NVarChar(1) -- String +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + COUNT(*) as [COUNT_1] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID] as [ID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender NVarChar(1) -- String +SET @Gender = 'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID] as [ID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlCe (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlCe.LinqService).sql b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlCe.LinqService).sql index 8fe609786b3c..3893c70ffef8 100644 --- a/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlCe.LinqService).sql +++ b/SqlCe.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlCe.LinqService).sql @@ -34,3 +34,58 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID] as [ID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @Gender NVarChar(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName NVarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName NVarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlCe (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID] as [ID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlCe/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlCe).sql b/SqlCe/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlCe).sql new file mode 100644 index 000000000000..b950a77d4c81 --- /dev/null +++ b/SqlCe/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlCe).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlCe/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlCe).sql b/SqlCe/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlCe).sql new file mode 100644 index 000000000000..6a74937b9358 --- /dev/null +++ b/SqlCe/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlCe).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlCe/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlCe).sql b/SqlCe/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlCe).sql new file mode 100644 index 000000000000..6a74937b9358 --- /dev/null +++ b/SqlCe/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlCe).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlCe (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From 7c5254208aee429821d5a7ea64da1e7c89fdc518 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:13:34 +0000 Subject: [PATCH 02/40] [Windows / SQL Server 2005] baselines --- ....All4Async(SqlServer.2005.LinqService).sql | 17 + ...upBy2Async(SqlServer.2005.LinqService).sql | 30 ++ ...rable1Test(SqlServer.2005.LinqService).sql | 9 + ...rable2Test(SqlServer.2005.LinqService).sql | 11 + ...eCast1Test(SqlServer.2005.LinqService).sql | 9 + ...eCast2Test(SqlServer.2005.LinqService).sql | 11 + ...sAsyncTest(SqlServer.2005.LinqService).sql | 17 + ...tAsyncTest(SqlServer.2005.LinqService).sql | 14 + ...keSkipTest(SqlServer.2005.LinqService).sql | 24 + ...tOrDefault(SqlServer.2005.LinqService).sql | 19 + ...pAsyncTest(SqlServer.2005.LinqService).sql | 21 + ...tAsyncTest(SqlServer.2005.LinqService).sql | 21 + ...yTestAsync(SqlServer.2005.LinqService).sql | 38 ++ ...TestAsync2(SqlServer.2005.LinqService).sql | 38 ++ ...AsyncdTest(SqlServer.2005.LinqService).sql | 15 + ...Test3Async(SqlServer.2005.LinqService).sql | 26 + ...sTestAsync(SqlServer.2005.LinqService).sql | 34 ++ ...tTestAsync(SqlServer.2005.LinqService).sql | 24 + ...TestAsync2(SqlServer.2005.LinqService).sql | 24 + ...TestAsync1(SqlServer.2005.LinqService).sql | 26 + ...TestAsync2(SqlServer.2005.LinqService).sql | 26 + ...xTestAsync(SqlServer.2005.LinqService).sql | 24 + ...TestAsync2(SqlServer.2005.LinqService).sql | 24 + ...icateAsync(SqlServer.2005.LinqService).sql | 178 +------ ...icateAsync(SqlServer.2005.LinqService).sql | 171 +------ ...icateAsync(SqlServer.2005.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2005.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2005.LinqService).sql | 171 +------ ...ectorAsync(SqlServer.2005.LinqService).sql | 171 +------ ...ectorAsync(SqlServer.2005.LinqService).sql | 171 +------ ...icateAsync(SqlServer.2005.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2005.LinqService).sql | 172 +------ ...ncat1Async(SqlServer.2005.LinqService).sql | 19 + ...ementAsync(SqlServer.2005.LinqService).sql | 99 ++++ ...teredAsync(SqlServer.2005.LinqService).sql | 84 ++++ ...ount1Async(SqlServer.2005.LinqService).sql | 8 + ...ount2Async(SqlServer.2005.LinqService).sql | 10 + ...yMax1Async(SqlServer.2005.LinqService).sql | 17 + ....Issue4602(SqlServer.2005.LinqService).sql | 54 +- ...4057_Async(SqlServer.2005.LinqService).sql | 29 ++ ...ransaction(SqlServer.2005.LinqService).sql | 29 ++ ...ssionAsync(SqlServer.2005.LinqService).sql | 25 + ...Cast1Async(SqlServer.2005.LinqService).sql | 11 + ...est18Async(SqlServer.2005.LinqService).sql | 14 + ...eter1Async(SqlServer.2005.LinqService).sql | 6 + ...ue3132Test(SqlServer.2005.LinqService).sql | 213 ++++++++ ...sync(SqlServer.2005.LinqService,False).sql | 24 + ...Async(SqlServer.2005.LinqService,True).sql | 24 + ...sync(SqlServer.2005.LinqService,False).sql | 24 + ...Async(SqlServer.2005.LinqService,True).sql | 24 + ...Skip1Async(SqlServer.2005.LinqService).sql | 93 +--- ...sync(SqlServer.2005.LinqService,False).sql | 18 + ...Async(SqlServer.2005.LinqService,True).sql | 22 + ...sync(SqlServer.2005.LinqService,False).sql | 11 + ...Async(SqlServer.2005.LinqService,True).sql | 11 + ...sync(SqlServer.2005.LinqService,False).sql | 11 + ...Async(SqlServer.2005.LinqService,True).sql | 13 + ...sync(SqlServer.2005.LinqService,False).sql | 11 + ...Async(SqlServer.2005.LinqService,True).sql | 13 + ...sync(SqlServer.2005.LinqService,False).sql | 9 + ...Async(SqlServer.2005.LinqService,True).sql | 11 + ...er.2005.LinqService,False,False,False).sql | 17 + ...ver.2005.LinqService,False,False,True).sql | 17 + ...ver.2005.LinqService,False,True,False).sql | 17 + ...rver.2005.LinqService,False,True,True).sql | 17 + ...able1Async(SqlServer.2005.LinqService).sql | 35 ++ ...TableAsync(SqlServer.2005.LinqService).sql | 33 ++ ...eNameAsync(SqlServer.2005.LinqService).sql | 90 ++++ ...ncTest(SqlServer.2005.LinqService,100).sql | 19 + ...ncTest(SqlServer.2005.LinqService,200).sql | 19 + ...Record(SqlServer.2005.LinqService,100).sql | 13 + ...Record(SqlServer.2005.LinqService,200).sql | 13 + ...ncTest(SqlServer.2005.LinqService,100).sql | 15 + ...ncTest(SqlServer.2005.LinqService,200).sql | 15 + ...Record(SqlServer.2005.LinqService,100).sql | 15 + ...Record(SqlServer.2005.LinqService,200).sql | 15 + ...ncTest(SqlServer.2005.LinqService,100).sql | 21 + ...ncTest(SqlServer.2005.LinqService,200).sql | 21 + ...ncTest(SqlServer.2005.LinqService,100).sql | 12 + ...ncTest(SqlServer.2005.LinqService,200).sql | 12 + ...Record(SqlServer.2005.LinqService,100).sql | 12 + ...Record(SqlServer.2005.LinqService,200).sql | 12 + ...sert2Async(SqlServer.2005.LinqService).sql | 46 ++ ...sert3Async(SqlServer.2005.LinqService).sql | 48 ++ ...sert4Async(SqlServer.2005.LinqService).sql | 48 ++ ...eNameAsync(SqlServer.2005.LinqService).sql | 70 +++ ...lace1Async(SqlServer.2005.LinqService).sql | 103 ++++ ...eNameAsync(SqlServer.2005.LinqService).sql | 159 ++++++ ...date3Async(SqlServer.2005.LinqService).sql | 103 ++++ ...ate3xAsync(SqlServer.2005.LinqService).sql | 109 +++++ ...tity1Async(SqlServer.2005.LinqService).sql | 14 + ...tity2Async(SqlServer.2005.LinqService).sql | 14 + ...tity4Async(SqlServer.2005.LinqService).sql | 32 ++ ...syncTest(SqlServer.2005.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2005.LinqService,2).sql | 43 +- ...syncTest(SqlServer.2005.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2005.LinqService,2).sql | 43 +- ...tAsync(SqlServer.2005.LinqService,100).sql | 24 + ...tAsync(SqlServer.2005.LinqService,200).sql | 24 + ...Record(SqlServer.2005.LinqService,100).sql | 24 + ...Record(SqlServer.2005.LinqService,200).sql | 24 + ...syncTest(SqlServer.2005.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2005.LinqService,2).sql | 43 +- ...syncTest(SqlServer.2005.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2005.LinqService,2).sql | 43 +- ...ate12Async(SqlServer.2005.LinqService).sql | 13 + ...date1Async(SqlServer.2005.LinqService).sql | 54 ++ ...date2Async(SqlServer.2005.LinqService).sql | 54 ++ ...date4Async(SqlServer.2005.LinqService).sql | 55 +++ ...tion1Async(SqlServer.2005.LinqService).sql | 41 ++ ...n1AsyncOld(SqlServer.2005.LinqService).sql | 41 ++ ...eNameAsync(SqlServer.2005.LinqService).sql | 106 ++++ ...plex1Async(SqlServer.2005.LinqService).sql | 55 +++ ...oTestAsync(SqlServer.2005.LinqService).sql | 23 + ...tTestAsync(SqlServer.2005.LinqService).sql | 458 +---------------- ...ngleRecord(SqlServer.2005.LinqService).sql | 460 +----------------- ...oTestAsync(SqlServer.2005.LinqService).sql | 23 + ...tTestAsync(SqlServer.2005.LinqService).sql | 455 +---------------- ...nateUpdate(SqlServer.2005.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2005.LinqService).sql | 456 +---------------- ...WithoutOld(SqlServer.2005.LinqService).sql | 454 +---------------- ...nateUpdate(SqlServer.2005.LinqService).sql | 453 +---------------- ...ngleRecord(SqlServer.2005.LinqService).sql | 455 +---------------- ...oTestAsync(SqlServer.2005.LinqService).sql | 23 + ...tTestAsync(SqlServer.2005.LinqService).sql | 458 +---------------- ...ngleRecord(SqlServer.2005.LinqService).sql | 460 +----------------- ...oTestAsync(SqlServer.2005.LinqService).sql | 23 + ...tTestAsync(SqlServer.2005.LinqService).sql | 455 +---------------- ...nateUpdate(SqlServer.2005.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2005.LinqService).sql | 456 +---------------- ...WithoutOld(SqlServer.2005.LinqService).sql | 454 +---------------- ...nateUpdate(SqlServer.2005.LinqService).sql | 453 +---------------- ...ngleRecord(SqlServer.2005.LinqService).sql | 455 +---------------- ...oTestAsync(SqlServer.2005.LinqService).sql | 21 + ...tTestAsync(SqlServer.2005.LinqService).sql | 235 +-------- ...ngleRecord(SqlServer.2005.LinqService).sql | 235 +-------- ...tTestAsync(SqlServer.2005.LinqService).sql | 231 +-------- ...ngleRecord(SqlServer.2005.LinqService).sql | 231 +-------- ...WithoutOld(SqlServer.2005.LinqService).sql | 230 +-------- ...ngleRecord(SqlServer.2005.LinqService).sql | 230 +-------- ...tIntoAsync(SqlServer.2005.LinqService).sql | 21 + ...oTestAsync(SqlServer.2005.LinqService).sql | 22 + ...tTestAsync(SqlServer.2005.LinqService).sql | 236 +-------- ...ngleRecord(SqlServer.2005.LinqService).sql | 236 +-------- ...tTestAsync(SqlServer.2005.LinqService).sql | 232 +-------- ...ngleRecord(SqlServer.2005.LinqService).sql | 232 +-------- ...WithoutOld(SqlServer.2005.LinqService).sql | 231 +-------- ...ngleRecord(SqlServer.2005.LinqService).sql | 231 +-------- ...tIntoAsync(SqlServer.2005.LinqService).sql | 22 + ...l4Async(SqlServer.2005.MS.LinqService).sql | 17 + ...y2Async(SqlServer.2005.MS.LinqService).sql | 30 ++ ...le1Test(SqlServer.2005.MS.LinqService).sql | 9 + ...le2Test(SqlServer.2005.MS.LinqService).sql | 11 + ...st1Test(SqlServer.2005.MS.LinqService).sql | 9 + ...st2Test(SqlServer.2005.MS.LinqService).sql | 11 + ...yncTest(SqlServer.2005.MS.LinqService).sql | 17 + ...yncTest(SqlServer.2005.MS.LinqService).sql | 14 + ...kipTest(SqlServer.2005.MS.LinqService).sql | 24 + ...Default(SqlServer.2005.MS.LinqService).sql | 19 + ...yncTest(SqlServer.2005.MS.LinqService).sql | 21 + ...yncTest(SqlServer.2005.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2005.MS.LinqService).sql | 38 ++ ...tAsync2(SqlServer.2005.MS.LinqService).sql | 38 ++ ...ncdTest(SqlServer.2005.MS.LinqService).sql | 15 + ...t3Async(SqlServer.2005.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2005.MS.LinqService).sql | 34 ++ ...stAsync(SqlServer.2005.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2005.MS.LinqService).sql | 24 + ...tAsync1(SqlServer.2005.MS.LinqService).sql | 26 + ...tAsync2(SqlServer.2005.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2005.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2005.MS.LinqService).sql | 24 + ...teAsync(SqlServer.2005.MS.LinqService).sql | 178 +------ ...teAsync(SqlServer.2005.MS.LinqService).sql | 171 +------ ...teAsync(SqlServer.2005.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2005.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2005.MS.LinqService).sql | 171 +------ ...orAsync(SqlServer.2005.MS.LinqService).sql | 171 +------ ...orAsync(SqlServer.2005.MS.LinqService).sql | 171 +------ ...teAsync(SqlServer.2005.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2005.MS.LinqService).sql | 172 +------ ...t1Async(SqlServer.2005.MS.LinqService).sql | 19 + ...ntAsync(SqlServer.2005.MS.LinqService).sql | 99 ++++ ...edAsync(SqlServer.2005.MS.LinqService).sql | 84 ++++ ...t1Async(SqlServer.2005.MS.LinqService).sql | 8 + ...t2Async(SqlServer.2005.MS.LinqService).sql | 10 + ...x1Async(SqlServer.2005.MS.LinqService).sql | 17 + ...sue4602(SqlServer.2005.MS.LinqService).sql | 54 +- ...7_Async(SqlServer.2005.MS.LinqService).sql | 29 ++ ...saction(SqlServer.2005.MS.LinqService).sql | 29 ++ ...onAsync(SqlServer.2005.MS.LinqService).sql | 25 + ...t1Async(SqlServer.2005.MS.LinqService).sql | 11 + ...18Async(SqlServer.2005.MS.LinqService).sql | 14 + ...r1Async(SqlServer.2005.MS.LinqService).sql | 6 + ...132Test(SqlServer.2005.MS.LinqService).sql | 213 ++++++++ ...c(SqlServer.2005.MS.LinqService,False).sql | 24 + ...nc(SqlServer.2005.MS.LinqService,True).sql | 24 + ...c(SqlServer.2005.MS.LinqService,False).sql | 24 + ...nc(SqlServer.2005.MS.LinqService,True).sql | 24 + ...p1Async(SqlServer.2005.MS.LinqService).sql | 93 +--- ...c(SqlServer.2005.MS.LinqService,False).sql | 18 + ...nc(SqlServer.2005.MS.LinqService,True).sql | 22 + ...c(SqlServer.2005.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2005.MS.LinqService,True).sql | 11 + ...c(SqlServer.2005.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2005.MS.LinqService,True).sql | 13 + ...c(SqlServer.2005.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2005.MS.LinqService,True).sql | 13 + ...c(SqlServer.2005.MS.LinqService,False).sql | 9 + ...nc(SqlServer.2005.MS.LinqService,True).sql | 11 + ...2005.MS.LinqService,False,False,False).sql | 17 + ....2005.MS.LinqService,False,False,True).sql | 17 + ....2005.MS.LinqService,False,True,False).sql | 17 + ...r.2005.MS.LinqService,False,True,True).sql | 17 + ...e1Async(SqlServer.2005.MS.LinqService).sql | 35 ++ ...leAsync(SqlServer.2005.MS.LinqService).sql | 33 ++ ...meAsync(SqlServer.2005.MS.LinqService).sql | 90 ++++ ...est(SqlServer.2005.MS.LinqService,100).sql | 19 + ...est(SqlServer.2005.MS.LinqService,200).sql | 19 + ...ord(SqlServer.2005.MS.LinqService,100).sql | 13 + ...ord(SqlServer.2005.MS.LinqService,200).sql | 13 + ...est(SqlServer.2005.MS.LinqService,100).sql | 15 + ...est(SqlServer.2005.MS.LinqService,200).sql | 15 + ...ord(SqlServer.2005.MS.LinqService,100).sql | 15 + ...ord(SqlServer.2005.MS.LinqService,200).sql | 15 + ...est(SqlServer.2005.MS.LinqService,100).sql | 21 + ...est(SqlServer.2005.MS.LinqService,200).sql | 21 + ...est(SqlServer.2005.MS.LinqService,100).sql | 12 + ...est(SqlServer.2005.MS.LinqService,200).sql | 12 + ...ord(SqlServer.2005.MS.LinqService,100).sql | 12 + ...ord(SqlServer.2005.MS.LinqService,200).sql | 12 + ...t2Async(SqlServer.2005.MS.LinqService).sql | 46 ++ ...t3Async(SqlServer.2005.MS.LinqService).sql | 48 ++ ...t4Async(SqlServer.2005.MS.LinqService).sql | 48 ++ ...meAsync(SqlServer.2005.MS.LinqService).sql | 70 +++ ...e1Async(SqlServer.2005.MS.LinqService).sql | 103 ++++ ...meAsync(SqlServer.2005.MS.LinqService).sql | 159 ++++++ ...e3Async(SqlServer.2005.MS.LinqService).sql | 103 ++++ ...3xAsync(SqlServer.2005.MS.LinqService).sql | 109 +++++ ...y1Async(SqlServer.2005.MS.LinqService).sql | 14 + ...y2Async(SqlServer.2005.MS.LinqService).sql | 14 + ...y4Async(SqlServer.2005.MS.LinqService).sql | 32 ++ ...cTest(SqlServer.2005.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2005.MS.LinqService,2).sql | 43 +- ...cTest(SqlServer.2005.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2005.MS.LinqService,2).sql | 43 +- ...ync(SqlServer.2005.MS.LinqService,100).sql | 24 + ...ync(SqlServer.2005.MS.LinqService,200).sql | 24 + ...ord(SqlServer.2005.MS.LinqService,100).sql | 24 + ...ord(SqlServer.2005.MS.LinqService,200).sql | 24 + ...cTest(SqlServer.2005.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2005.MS.LinqService,2).sql | 43 +- ...cTest(SqlServer.2005.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2005.MS.LinqService,2).sql | 43 +- ...12Async(SqlServer.2005.MS.LinqService).sql | 13 + ...e1Async(SqlServer.2005.MS.LinqService).sql | 54 ++ ...e2Async(SqlServer.2005.MS.LinqService).sql | 54 ++ ...e4Async(SqlServer.2005.MS.LinqService).sql | 55 +++ ...n1Async(SqlServer.2005.MS.LinqService).sql | 41 ++ ...syncOld(SqlServer.2005.MS.LinqService).sql | 41 ++ ...meAsync(SqlServer.2005.MS.LinqService).sql | 106 ++++ ...x1Async(SqlServer.2005.MS.LinqService).sql | 55 +++ ...stAsync(SqlServer.2005.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2005.MS.LinqService).sql | 458 +---------------- ...eRecord(SqlServer.2005.MS.LinqService).sql | 460 +----------------- ...stAsync(SqlServer.2005.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2005.MS.LinqService).sql | 455 +---------------- ...eUpdate(SqlServer.2005.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2005.MS.LinqService).sql | 456 +---------------- ...houtOld(SqlServer.2005.MS.LinqService).sql | 454 +---------------- ...eUpdate(SqlServer.2005.MS.LinqService).sql | 453 +---------------- ...eRecord(SqlServer.2005.MS.LinqService).sql | 455 +---------------- ...stAsync(SqlServer.2005.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2005.MS.LinqService).sql | 458 +---------------- ...eRecord(SqlServer.2005.MS.LinqService).sql | 460 +----------------- ...stAsync(SqlServer.2005.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2005.MS.LinqService).sql | 455 +---------------- ...eUpdate(SqlServer.2005.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2005.MS.LinqService).sql | 456 +---------------- ...houtOld(SqlServer.2005.MS.LinqService).sql | 454 +---------------- ...eUpdate(SqlServer.2005.MS.LinqService).sql | 453 +---------------- ...eRecord(SqlServer.2005.MS.LinqService).sql | 455 +---------------- ...stAsync(SqlServer.2005.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2005.MS.LinqService).sql | 235 +-------- ...eRecord(SqlServer.2005.MS.LinqService).sql | 235 +-------- ...stAsync(SqlServer.2005.MS.LinqService).sql | 231 +-------- ...eRecord(SqlServer.2005.MS.LinqService).sql | 231 +-------- ...houtOld(SqlServer.2005.MS.LinqService).sql | 230 +-------- ...eRecord(SqlServer.2005.MS.LinqService).sql | 230 +-------- ...toAsync(SqlServer.2005.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2005.MS.LinqService).sql | 22 + ...stAsync(SqlServer.2005.MS.LinqService).sql | 236 +-------- ...eRecord(SqlServer.2005.MS.LinqService).sql | 236 +-------- ...stAsync(SqlServer.2005.MS.LinqService).sql | 232 +-------- ...eRecord(SqlServer.2005.MS.LinqService).sql | 232 +-------- ...houtOld(SqlServer.2005.MS.LinqService).sql | 231 +-------- ...eRecord(SqlServer.2005.MS.LinqService).sql | 231 +-------- ...toAsync(SqlServer.2005.MS.LinqService).sql | 22 + ...inq.AsyncTests.Test(SqlServer.2005.MS).sql | 18 + ...nq.AsyncTests.Test1(SqlServer.2005.MS).sql | 9 + ...ncTests.TestForEach(SqlServer.2005.MS).sql | 9 + ...s.Linq.AsyncTests.Test(SqlServer.2005).sql | 18 + ....Linq.AsyncTests.Test1(SqlServer.2005).sql | 9 + ...AsyncTests.TestForEach(SqlServer.2005).sql | 9 + 304 files changed, 7864 insertions(+), 22792 deletions(-) create mode 100644 SqlServer.2005.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.LinqService,False).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.LinqService,True).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.LinqService,False).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.LinqService,True).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.LinqService,False).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.LinqService,True).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.LinqService,False).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.LinqService,True).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.LinqService,False).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.LinqService,True).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.LinqService,False).sql create mode 100644 SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.LinqService,True).sql create mode 100644 SqlServer.2005.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2005.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.MS.LinqService,False).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.MS.LinqService,True).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.MS.LinqService,False).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.MS.LinqService,True).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.MS.LinqService,False).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.MS.LinqService,True).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.MS.LinqService,False).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.MS.LinqService,True).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.MS.LinqService,False).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.MS.LinqService,True).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.MS.LinqService,False).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.MS.LinqService,True).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2005.MS.LinqService).sql create mode 100644 SqlServer.2005.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2005.MS).sql create mode 100644 SqlServer.2005.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2005.MS).sql create mode 100644 SqlServer.2005.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2005.MS).sql create mode 100644 SqlServer.2005/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2005).sql create mode 100644 SqlServer.2005/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2005).sql create mode 100644 SqlServer.2005/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2005).sql diff --git a/SqlServer.2005.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..4be3f93479a3 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2005.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..3bf9537f37a4 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..2605d6ce6d67 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2005.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..bbe2464fc1b8 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2005.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..2605d6ce6d67 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2005.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..bbe2464fc1b8 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2005.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..c096a4e66194 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2005.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..c82481baf573 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2005.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2005.LinqService).sql index 880addab7a36..5aaf9cbbeea2 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2005.LinqService).sql @@ -22,3 +22,27 @@ WHERE ORDER BY [t2].[ParentID] +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t2].[ParentID], + [t2].[Value1] +FROM + ( + SELECT + [t1].[ParentID], + [t1].[Value1], + ROW_NUMBER() OVER (ORDER BY [t1].[ParentID]) as [RN] + FROM + [Parent] [t1] + ) [t2] +WHERE + [t2].[RN] > @skip AND [t2].[RN] <= (@skip + @take) +ORDER BY + [t2].[ParentID] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..e4f155603b9a --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2005.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..38dca5d660e6 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2005.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..38dca5d660e6 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2005.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..b19ca1fe44f0 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2005.LinqService).sql @@ -0,0 +1,38 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..b19ca1fe44f0 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2005.LinqService).sql @@ -0,0 +1,38 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..c17ceb727a21 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2005.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..84dfd844a0ba --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..9684c9839ad8 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2005.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..cc00b0603862 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2005.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..cc00b0603862 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2005.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..985b80ef8baf --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2005.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..985b80ef8baf --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2005.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..bb129e037e5a --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2005.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..bb129e037e5a --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2005.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2005.LinqService).sql index 1d745e161372..a8bcc869ef4c 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2005.LinqService).sql @@ -1,163 +1,19 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ) + THEN 1 + ELSE 0 + END diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2005.LinqService).sql index 1d745e161372..26f5b8c59cc9 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2005.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2005.LinqService).sql index 1d745e161372..5f897ee738d1 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2005.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2005.LinqService).sql index 1d745e161372..5f897ee738d1 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2005.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2005.LinqService).sql index 1d745e161372..26f5b8c59cc9 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2005.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2005.LinqService).sql index 1d745e161372..85dde90777ce 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2005.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2005.LinqService).sql index 1d745e161372..b238205bd709 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2005.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2005.LinqService).sql index 1d745e161372..a94ef2dd0010 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2005.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2005.LinqService).sql index 1d745e161372..a94ef2dd0010 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2005.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2005.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..88068ba744cd --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2005.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2005.LinqService).sql index cc9b92f51965..c1729cc497e1 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2005.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2005 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005 diff --git a/SqlServer.2005.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2005.LinqService).sql index c0603d89185e..50c29b62f8f4 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2005.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2005 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005 diff --git a/SqlServer.2005.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..e80acf8f7dd3 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..76a964a666a5 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2005.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..c7becfbfe184 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2005.LinqService).sql index dd48ebe65b56..ee6d588b43e4 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2005.LinqService).sql @@ -1,47 +1,11 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] +-- SqlServer.2005 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2005.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2005.LinqService).sql index 905ccd34112d..1f1e1425c0fe 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2005.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2005 (asynchronously) diff --git a/SqlServer.2005.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2005.LinqService).sql index fe2e35c25e5b..f609ec79d03f 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2005.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2005 (asynchronously) diff --git a/SqlServer.2005.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..b277a2c111ab --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2005.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..a5b24a54fbbc --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2005.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..ab1c35075a0a --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2005.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..1ca4257769bf --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2005.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..f2a9e7be199c --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2005.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.LinqService,False).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.LinqService,False).sql new file mode 100644 index 000000000000..026247d19379 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.LinqService,False).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.LinqService,True).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.LinqService,True).sql new file mode 100644 index 000000000000..026247d19379 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.LinqService,True).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.LinqService,False).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.LinqService,False).sql new file mode 100644 index 000000000000..026247d19379 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.LinqService,False).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.LinqService,True).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.LinqService,True).sql new file mode 100644 index 000000000000..026247d19379 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.LinqService,True).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2005.LinqService).sql index d56de3d526cf..a3b9d5b06cef 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2005.LinqService).sql @@ -1,77 +1,22 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] +-- SqlServer.2005 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @skip_1 Int -- Int32 +SET @skip_1 = 2 + +SELECT + [t2].[Value_1] +FROM ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] + SELECT + [t1].[Value] as [Value_1], + ROW_NUMBER() OVER (ORDER BY [t1].[Value]) as [RN] + FROM + [TakeSkipClass] [t1] + ) [t2] +WHERE + [t2].[RN] > @skip + @skip_1 +ORDER BY + [t2].[Value_1] diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.LinqService,False).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.LinqService,False).sql index 9a9d648c88ff..904c6a5c3114 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.LinqService,False).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.LinqService,True).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.LinqService,True).sql index bf1f00c99d41..331f6b44ec1c 100644 --- a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.LinqService,True).sql +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.LinqService,False).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.LinqService,False).sql new file mode 100644 index 000000000000..475556be1c51 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.LinqService,True).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.LinqService,True).sql new file mode 100644 index 000000000000..475556be1c51 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.LinqService,False).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.LinqService,False).sql new file mode 100644 index 000000000000..2319d3f86692 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.LinqService,True).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.LinqService,True).sql new file mode 100644 index 000000000000..c3e6ad580098 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.LinqService,False).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.LinqService,False).sql new file mode 100644 index 000000000000..192096ffb4b2 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.LinqService,True).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.LinqService,True).sql new file mode 100644 index 000000000000..9a4dcf822072 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.LinqService,False).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.LinqService,False).sql new file mode 100644 index 000000000000..0f6165687953 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.LinqService,True).sql b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.LinqService,True).sql new file mode 100644 index 000000000000..4e2f9438c74f --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,False,False).sql b/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,False,False).sql index 8262c151e0c4..82126ae5b707 100644 --- a/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,False,False).sql +++ b/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,False,False).sql @@ -4,3 +4,20 @@ IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2005 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,False,True).sql b/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,False,True).sql index 674a1815bdc9..1d88af58cca1 100644 --- a/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,False,True).sql +++ b/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,False,True).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2005 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,True,False).sql b/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,True,False).sql index ec28a69d7f6b..1024b261696c 100644 --- a/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,True,False).sql +++ b/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,True,False).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2005 (asynchronously) + +CREATE TABLE [TestData]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,True,True).sql b/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,True,True).sql index f1c687561b30..da7170265a10 100644 --- a/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,True,True).sql +++ b/SqlServer.2005.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.LinqService,False,True,True).sql @@ -20,3 +20,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2005 (asynchronously) + +CREATE TABLE [TestData].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..c2756c4d14f3 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,35 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[TestTable]', N'U') IS NOT NULL) + DROP TABLE [TestTable] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2005.LinqService).sql index 1609b4c38d42..9799c360f01e 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2005.LinqService).sql @@ -1,4 +1,31 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2005 SELECT @@ -7,3 +34,9 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..eb973dff4af9 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2005.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.LinqService,100).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.LinqService,100).sql index 100091dfaca4..5f65ab9ac2e7 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.LinqService,100).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.LinqService,100).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.LinqService,200).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.LinqService,200).sql index 100091dfaca4..5f65ab9ac2e7 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.LinqService,200).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.LinqService,200).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.LinqService,100).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.LinqService,100).sql index 73ce7fd2675a..993712bcbf5b 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.LinqService,100).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.LinqService,200).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.LinqService,200).sql index 73ce7fd2675a..993712bcbf5b 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.LinqService,200).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.LinqService,100).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.LinqService,100).sql index 100091dfaca4..9e1f577ff9e0 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.LinqService,100).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.LinqService,200).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.LinqService,200).sql index 100091dfaca4..03de1fc91168 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.LinqService,200).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,100).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,100).sql index 73ce7fd2675a..4e86e0b66ebe 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,100).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,200).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,200).sql index 73ce7fd2675a..70697c3e2d0f 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,200).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.LinqService,100).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.LinqService,100).sql index c06d2fe1c96c..f5053449948a 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.LinqService,100).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2005 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.LinqService,200).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.LinqService,200).sql index c06d2fe1c96c..754d36941f93 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.LinqService,200).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2005 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.LinqService,100).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.LinqService,100).sql index 100091dfaca4..05e172d71a71 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.LinqService,100).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.LinqService,200).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.LinqService,200).sql index 100091dfaca4..05e172d71a71 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.LinqService,200).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,100).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,100).sql index 73ce7fd2675a..555902c07a1d 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,100).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,200).sql b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,200).sql index 73ce7fd2675a..555902c07a1d 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,200).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..3c55432efa2b --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..54896e49d00f --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..54896e49d00f --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2005.LinqService).sql index b82e3c59ad67..859e88aa8617 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2005.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2005 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,33 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2005.LinqService).sql index f748aaa0890f..f5287304a678 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2005.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = @Diagnosis +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = @Diagnosis +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = @Diagnosis +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..5eac6b9f0dc5 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2005.LinqService).sql @@ -0,0 +1,159 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +FROM + [xxPatient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [xxPatient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +FROM + [xxPatient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [xxPatient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +FROM + [xxPatient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [xxPatient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +FROM + [xxPatient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [xxPatient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2005.LinqService).sql index f748aaa0890f..693f9e3408bc 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2005.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ) +END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ) +END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ) +END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2005.LinqService).sql index f748aaa0890f..6e4c4022d9c7 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2005.LinqService).sql @@ -31,3 +31,112 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id2 + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ) +END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id2 + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ) +END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id2 + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ) +END + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2005.LinqService).sql index ae7fa216cf24..9c3a8f6ed824 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2005.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2005 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2005.LinqService).sql index ae7fa216cf24..9c3a8f6ed824 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2005.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2005 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2005.LinqService).sql index 29ae04e4d7bc..62af388f958d 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2005.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2005 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2005 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.LinqService,1).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.LinqService,1).sql index 832453204e2b..ec8143f05e5b 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.LinqService,1).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005 +-- SqlServer.2005 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.LinqService,2).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.LinqService,2).sql index 832453204e2b..a676412580af 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.LinqService,2).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005 +-- SqlServer.2005 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,1).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,1).sql index 832453204e2b..424cef28bb50 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,1).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005 +-- SqlServer.2005 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,2).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,2).sql index 832453204e2b..3fe7ccd10577 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,2).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005 +-- SqlServer.2005 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.LinqService,100).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.LinqService,100).sql index 868b9d45956a..d21f2395de88 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.LinqService,100).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2005 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.LinqService,200).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.LinqService,200).sql index 1bafa8711a10..b1c941c72716 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.LinqService,200).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2005 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.LinqService,100).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.LinqService,100).sql index ab77c8c7316b..73d3cc138c27 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.LinqService,100).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2005 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.LinqService,200).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.LinqService,200).sql index 44b694ecbe3c..859e78ff88cc 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.LinqService,200).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2005 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.LinqService,1).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.LinqService,1).sql index 832453204e2b..7cd450d3f6fa 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.LinqService,1).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005 +-- SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.LinqService,2).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.LinqService,2).sql index 832453204e2b..ed1afa0fcad4 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.LinqService,2).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005 +-- SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,1).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,1).sql index 832453204e2b..424cef28bb50 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,1).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005 +-- SqlServer.2005 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,2).sql b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,2).sql index 832453204e2b..3fe7ccd10577 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,2).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005 +-- SqlServer.2005 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..2cb1548a6817 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..fb7cd9e4fbad --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..fb7cd9e4fbad --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..4e4684bc022e --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..48cdd611b721 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2005.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..48cdd611b721 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2005.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2005.LinqService).sql new file mode 100644 index 000000000000..b10eb81d8888 --- /dev/null +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2005.LinqService).sql @@ -0,0 +1,106 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2005.LinqService).sql index 203a7138a8b9..4a4fac77f630 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2005.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql index 8795e40fcaad..4b93619a687c 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2005 SELECT diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql index 9a6e095ec380..aad641ba824c 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql index 9a6e095ec380..76d115438ec9 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2005.LinqService).sql index aef9a0e07de9..77a16f6f9ed1 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2005.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2005 SELECT diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql index 9a6e095ec380..25138c5511e3 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.LinqService).sql index 9a6e095ec380..59347ced9913 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql index 9a6e095ec380..8311227fb9ff 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql index 9a6e095ec380..de513ea02d30 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.LinqService).sql index 9a6e095ec380..6d3164f24682 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql index 9a6e095ec380..49cca4c0a63a 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql index 8795e40fcaad..4b93619a687c 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2005 SELECT diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql index 9a6e095ec380..aad641ba824c 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql index 9a6e095ec380..76d115438ec9 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2005.LinqService).sql index aef9a0e07de9..77a16f6f9ed1 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2005.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2005 SELECT diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql index 9a6e095ec380..25138c5511e3 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.LinqService).sql index 9a6e095ec380..59347ced9913 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql index 9a6e095ec380..8311227fb9ff 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql index 9a6e095ec380..de513ea02d30 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.LinqService).sql index 9a6e095ec380..6d3164f24682 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql index 9a6e095ec380..49cca4c0a63a 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql index 76a6fe7616cb..c962f1fd264c 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2005 SELECT diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql index a069b4014a4b..1a27d9279fce 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql index a069b4014a4b..994f3f8a1271 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql index a069b4014a4b..c998db8a9dcd 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql index a069b4014a4b..6f69a8f9d512 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql index a069b4014a4b..c67804bf48e9 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.LinqService).sql index a069b4014a4b..7e6e1e30e530 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2005.LinqService).sql index 76a6fe7616cb..10786ffa8e46 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2005.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2005 SELECT diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql index 76a6fe7616cb..efbe2180ce93 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2005.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2005 SELECT diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql index a069b4014a4b..d843f3307832 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2005.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql index a069b4014a4b..0cae534cdc05 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql index a069b4014a4b..d80fa523b1ea 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2005.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql index a069b4014a4b..b096058f1476 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql index a069b4014a4b..dc192c0f990e 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.LinqService).sql index a069b4014a4b..ec1233ad978e 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2005.LinqService).sql b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2005.LinqService).sql index 76a6fe7616cb..f4aaf5751e6a 100644 --- a/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2005.LinqService).sql +++ b/SqlServer.2005.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2005.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2005 SELECT diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..9025422f6039 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..052214d65cf3 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..804cc7ab9b31 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..af0a13dedfd2 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..804cc7ab9b31 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..af0a13dedfd2 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..864eab0b273c --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..6c3f33678803 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2005.MS.LinqService).sql index abfade14aeb0..d73f7b00f515 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2005.MS.LinqService).sql @@ -22,3 +22,27 @@ WHERE ORDER BY [t2].[ParentID] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t2].[ParentID], + [t2].[Value1] +FROM + ( + SELECT + [t1].[ParentID], + [t1].[Value1], + ROW_NUMBER() OVER (ORDER BY [t1].[ParentID]) as [RN] + FROM + [Parent] [t1] + ) [t2] +WHERE + [t2].[RN] > @skip AND [t2].[RN] <= (@skip + @take) +ORDER BY + [t2].[ParentID] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..9d0be5d3f16e --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..bd74b016c1d4 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..bd74b016c1d4 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..c284959f203b --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,38 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..c284959f203b --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,38 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..ec6de2ab847f --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..ee24686e46bd --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..44ac2a8ae75d --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..6f9c6c658348 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..6f9c6c658348 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..cdf966b18a66 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..cdf966b18a66 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..5eff38b600d2 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..5eff38b600d2 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2005.MS.LinqService).sql index 90369c6e0ec3..a85753362669 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2005.MS.LinqService).sql @@ -1,163 +1,19 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ) + THEN 1 + ELSE 0 + END diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2005.MS.LinqService).sql index 90369c6e0ec3..80b2166b015c 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2005.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2005.MS.LinqService).sql index 90369c6e0ec3..ca4c8c569e78 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2005.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2005.MS.LinqService).sql index 90369c6e0ec3..ca4c8c569e78 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2005.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2005.MS.LinqService).sql index 90369c6e0ec3..80b2166b015c 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2005.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2005.MS.LinqService).sql index 90369c6e0ec3..cc1909e52fd8 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2005.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2005.MS.LinqService).sql index 90369c6e0ec3..583453d1e67e 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2005.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2005.MS.LinqService).sql index 90369c6e0ec3..ba39e22308fb 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2005.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2005.MS.LinqService).sql index 90369c6e0ec3..ba39e22308fb 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2005.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..f9ea27eb7fb0 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2005.MS.LinqService).sql index 2bcfd5e93517..c42058d5046a 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2005.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2005.MS.LinqService).sql index e46caea4dbb4..b54e6cc3ef5a 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2005.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..448fbc8c81dd --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..c0e93e173ed2 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..67ab0a8b7e17 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2005.MS.LinqService).sql index 37e6653429ea..398845292c95 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2005.MS.LinqService).sql @@ -1,47 +1,11 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2005.MS.LinqService).sql index 4ab86fe04a1a..9b70c27cc4bb 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2005.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2005.MS SqlServer.2005 (asynchronously) diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2005.MS.LinqService).sql index 91ad0ad8abf5..3b17cb1553e1 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2005.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2005.MS SqlServer.2005 (asynchronously) diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..5da91bf4a7c1 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..5b28e67fa6a5 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..b53bb09e0cf2 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..b37af7a70996 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..7de5e36b8d59 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.MS.LinqService,False).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.MS.LinqService,False).sql new file mode 100644 index 000000000000..75d586bfd723 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.MS.LinqService,False).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.MS.LinqService,True).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.MS.LinqService,True).sql new file mode 100644 index 000000000000..75d586bfd723 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2005.MS.LinqService,True).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.MS.LinqService,False).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.MS.LinqService,False).sql new file mode 100644 index 000000000000..75d586bfd723 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.MS.LinqService,False).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.MS.LinqService,True).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.MS.LinqService,True).sql new file mode 100644 index 000000000000..75d586bfd723 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2005.MS.LinqService,True).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2005.MS.LinqService).sql index 01f2aef277de..5992ab35e448 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2005.MS.LinqService).sql @@ -1,77 +1,22 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @skip_1 Int -- Int32 +SET @skip_1 = 2 + +SELECT + [t2].[Value_1] +FROM ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] + SELECT + [t1].[Value] as [Value_1], + ROW_NUMBER() OVER (ORDER BY [t1].[Value]) as [RN] + FROM + [TakeSkipClass] [t1] + ) [t2] +WHERE + [t2].[RN] > @skip + @skip_1 +ORDER BY + [t2].[Value_1] diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.MS.LinqService,False).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.MS.LinqService,False).sql index 02f0b2bfb6ed..66f35e993f7d 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.MS.LinqService,False).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.MS.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.MS.LinqService,True).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.MS.LinqService,True).sql index 28ecdcd0791c..01239cb1aa5b 100644 --- a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.MS.LinqService,True).sql +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2005.MS.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.MS.LinqService,False).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.MS.LinqService,False).sql new file mode 100644 index 000000000000..d7e49cca4d45 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.MS.LinqService,True).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.MS.LinqService,True).sql new file mode 100644 index 000000000000..d7e49cca4d45 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2005.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.MS.LinqService,False).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.MS.LinqService,False).sql new file mode 100644 index 000000000000..654f1419cbd6 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.MS.LinqService,True).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.MS.LinqService,True).sql new file mode 100644 index 000000000000..17adb5caeef4 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2005.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.MS.LinqService,False).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.MS.LinqService,False).sql new file mode 100644 index 000000000000..93a2349fbba3 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.MS.LinqService,True).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.MS.LinqService,True).sql new file mode 100644 index 000000000000..08f6e35a3e80 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2005.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.MS.LinqService,False).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.MS.LinqService,False).sql new file mode 100644 index 000000000000..ce51b67bd6cb --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.MS.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.MS.LinqService,True).sql b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.MS.LinqService,True).sql new file mode 100644 index 000000000000..87d29aec23cf --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2005.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,False,False).sql b/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,False,False).sql index fb1b320d5ebc..62e98b9600b4 100644 --- a/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,False,False).sql +++ b/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,False,False).sql @@ -4,3 +4,20 @@ IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,False,True).sql b/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,False,True).sql index 1705f6e258d4..ff82fa79d603 100644 --- a/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,False,True).sql +++ b/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,False,True).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,True,False).sql b/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,True,False).sql index 263a946f6b87..258e0d218ab5 100644 --- a/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,True,False).sql +++ b/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,True,False).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +CREATE TABLE [TestDataMS]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,True,True).sql b/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,True,True).sql index 2ae085d87367..0b1772942e6c 100644 --- a/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,True,True).sql +++ b/SqlServer.2005.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2005.MS.LinqService,False,True,True).sql @@ -20,3 +20,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +CREATE TABLE [TestDataMS].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..a98456c7b70c --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,35 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[TestTable]', N'U') IS NOT NULL) + DROP TABLE [TestTable] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2005.MS.LinqService).sql index 67e10707c3be..84ecbf6cb7ee 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2005.MS.LinqService).sql @@ -1,4 +1,31 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 SELECT @@ -7,3 +34,9 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..4f2f3b9d834f --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.MS.LinqService,100).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.MS.LinqService,100).sql index 30218e54f437..740c09a92838 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.MS.LinqService,100).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.MS.LinqService,100).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.MS.LinqService,200).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.MS.LinqService,200).sql index 30218e54f437..740c09a92838 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.MS.LinqService,200).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2005.MS.LinqService,200).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,100).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,100).sql index 197fd9b68b1b..39a6cbdb701f 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,100).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,200).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,200).sql index 197fd9b68b1b..39a6cbdb701f 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,200).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.MS.LinqService,100).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.MS.LinqService,100).sql index 30218e54f437..eea79f78bce3 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.MS.LinqService,100).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.MS.LinqService,200).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.MS.LinqService,200).sql index 30218e54f437..35f71356339e 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.MS.LinqService,200).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2005.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,100).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,100).sql index 197fd9b68b1b..21509bcc5037 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,100).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,200).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,200).sql index 197fd9b68b1b..6b961ffc79c6 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,200).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.MS.LinqService,100).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.MS.LinqService,100).sql index 976b95ad9f98..259bf3c0527f 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.MS.LinqService,100).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.MS.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.MS.LinqService,200).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.MS.LinqService,200).sql index 976b95ad9f98..2c9e06ae3569 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.MS.LinqService,200).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2005.MS.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.MS.LinqService,100).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.MS.LinqService,100).sql index 30218e54f437..6f5d8aade4a6 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.MS.LinqService,100).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.MS.LinqService,200).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.MS.LinqService,200).sql index 30218e54f437..6f5d8aade4a6 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.MS.LinqService,200).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2005.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,100).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,100).sql index 197fd9b68b1b..7cb893fe3bdf 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,100).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,200).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,200).sql index 197fd9b68b1b..7cb893fe3bdf 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,200).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2005.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..bf1433d977f1 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..245320eb1e82 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..245320eb1e82 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2005.MS.LinqService).sql index 35a564eb99d6..55726fc0334d 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2005.MS.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,33 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2005.MS.LinqService).sql index a4fe7e7f09ba..20dff2bc4e54 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2005.MS.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = @Diagnosis +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = @Diagnosis +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = @Diagnosis +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..bd9b8256da56 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,159 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +FROM + [xxPatient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [xxPatient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +FROM + [xxPatient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [xxPatient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +FROM + [xxPatient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [xxPatient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +FROM + [xxPatient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [xxPatient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ) +END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2005.MS.LinqService).sql index a4fe7e7f09ba..e68b113dd38d 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2005.MS.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ) +END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ) +END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ) +END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2005.MS.LinqService).sql index a4fe7e7f09ba..a0641e0702d6 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2005.MS.LinqService).sql @@ -31,3 +31,112 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id2 + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ) +END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id2 + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ) +END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id2 + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ) +END + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2005.MS.LinqService).sql index b8b2d4ab2d12..3b963ac35f85 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2005.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2005.MS.LinqService).sql index b8b2d4ab2d12..3b963ac35f85 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2005.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2005.MS.LinqService).sql index 2b001770f3eb..3e58a77cd1a5 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2005.MS.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2005.MS SqlServer.2005 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,1).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,1).sql index 6f69ca6f9b6c..f42bf730d54c 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,1).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,2).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,2).sql index 6f69ca6f9b6c..909b2979f21b 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,2).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,1).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,1).sql index 6f69ca6f9b6c..966e8aaa1b29 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,1).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,2).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,2).sql index 6f69ca6f9b6c..3cbb9f45ddc0 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,2).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.MS.LinqService,100).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.MS.LinqService,100).sql index 57b7e1f889dc..ba37739df3d8 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.MS.LinqService,100).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.MS.LinqService,200).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.MS.LinqService,200).sql index d036e925d327..2c31caa2530f 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.MS.LinqService,200).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2005.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.MS.LinqService,100).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.MS.LinqService,100).sql index a11ace737cd4..4ff9c5faf874 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.MS.LinqService,100).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.MS.LinqService,200).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.MS.LinqService,200).sql index 486b1837c2ba..a68097261112 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.MS.LinqService,200).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2005.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,1).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,1).sql index 6f69ca6f9b6c..86d347bea4f8 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,1).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,2).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,2).sql index 6f69ca6f9b6c..0cfb4ef80e06 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,2).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2005.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,1).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,1).sql index 6f69ca6f9b6c..966e8aaa1b29 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,1).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,2).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,2).sql index 6f69ca6f9b6c..3cbb9f45ddc0 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,2).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2005.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..66358675e185 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..7bdf460ff89f --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..7bdf460ff89f --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..855a6de6ba1e --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..b2894c129ee1 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..b2894c129ee1 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2005.MS.LinqService).sql new file mode 100644 index 000000000000..c090bb381c88 --- /dev/null +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2005.MS.LinqService).sql @@ -0,0 +1,106 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2005.MS.LinqService).sql index 2cb76d7d9284..c3f457cd10b4 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2005.MS.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql index 7c5029ee4413..9a8f78ed7a21 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 SELECT diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..290db4966b21 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..502075880a83 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql index c48daf43a4f6..a22bb510ca80 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 SELECT diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..62639af84940 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..ed84462cd476 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..450d6508e77b 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..16489c485cd9 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..434815d40d74 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..aa557e068ad5 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql index 7c5029ee4413..9a8f78ed7a21 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 SELECT diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..290db4966b21 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..502075880a83 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql index c48daf43a4f6..a22bb510ca80 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 SELECT diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..62639af84940 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..ed84462cd476 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..450d6508e77b 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..16489c485cd9 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..434815d40d74 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql index 1f4f875a5135..aa557e068ad5 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2005.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql index ed0907ac62da..9c0fbc2e21de 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 SELECT diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql index 7ecdb9207786..d604fb1228f2 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql index 7ecdb9207786..da7d1d9d0dbe 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql index 7ecdb9207786..11c1310e9650 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql index 7ecdb9207786..08c3cc3b894c 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql index 7ecdb9207786..9cb5dba21092 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.MS.LinqService).sql index 7ecdb9207786..f85d4cad43ab 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.MS.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2005.MS.LinqService).sql index ed0907ac62da..f2fbd300554f 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2005.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 SELECT diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql index ed0907ac62da..4f6012a42fd9 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 SELECT diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql index 7ecdb9207786..60dafed1e8a7 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql index 7ecdb9207786..776b2bfc3262 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql index 7ecdb9207786..6285b12b55d4 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2005.MS.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql index 7ecdb9207786..47f831ad9a92 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2005.MS.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql index 7ecdb9207786..385d61124d6b 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2005.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.MS.LinqService).sql index 7ecdb9207786..761d53d9364a 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2005.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2005.MS SqlServer.2005 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2005.MS.LinqService).sql b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2005.MS.LinqService).sql index ed0907ac62da..bc3a0d481599 100644 --- a/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2005.MS.LinqService).sql +++ b/SqlServer.2005.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2005.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2005.MS SqlServer.2005 SELECT diff --git a/SqlServer.2005.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2005.MS).sql b/SqlServer.2005.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2005.MS).sql new file mode 100644 index 000000000000..6ca798853434 --- /dev/null +++ b/SqlServer.2005.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2005.MS).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2005.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2005.MS).sql b/SqlServer.2005.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2005.MS).sql new file mode 100644 index 000000000000..804cc7ab9b31 --- /dev/null +++ b/SqlServer.2005.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2005.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2005.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2005.MS).sql b/SqlServer.2005.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2005.MS).sql new file mode 100644 index 000000000000..804cc7ab9b31 --- /dev/null +++ b/SqlServer.2005.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2005.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2005.MS SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2005/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2005).sql b/SqlServer.2005/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2005).sql new file mode 100644 index 000000000000..d9f82604eaee --- /dev/null +++ b/SqlServer.2005/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2005).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2005/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2005).sql b/SqlServer.2005/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2005).sql new file mode 100644 index 000000000000..2605d6ce6d67 --- /dev/null +++ b/SqlServer.2005/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2005).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2005/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2005).sql b/SqlServer.2005/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2005).sql new file mode 100644 index 000000000000..2605d6ce6d67 --- /dev/null +++ b/SqlServer.2005/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2005).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2005 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From 91538239cff19eb7563e3cc827f120afb2d146d3 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:15:46 +0000 Subject: [PATCH 03/40] [Windows / SQL Server 2008] baselines --- ....All4Async(SqlServer.2008.LinqService).sql | 17 + ...upBy2Async(SqlServer.2008.LinqService).sql | 30 ++ ...rable1Test(SqlServer.2008.LinqService).sql | 9 + ...rable2Test(SqlServer.2008.LinqService).sql | 11 + ...eCast1Test(SqlServer.2008.LinqService).sql | 9 + ...eCast2Test(SqlServer.2008.LinqService).sql | 11 + ...sAsyncTest(SqlServer.2008.LinqService).sql | 17 + ...tAsyncTest(SqlServer.2008.LinqService).sql | 14 + ...keSkipTest(SqlServer.2008.LinqService).sql | 24 + ...tOrDefault(SqlServer.2008.LinqService).sql | 19 + ...pAsyncTest(SqlServer.2008.LinqService).sql | 21 + ...tAsyncTest(SqlServer.2008.LinqService).sql | 21 + ...yTestAsync(SqlServer.2008.LinqService).sql | 38 ++ ...TestAsync2(SqlServer.2008.LinqService).sql | 38 ++ ...AsyncdTest(SqlServer.2008.LinqService).sql | 15 + ...Test3Async(SqlServer.2008.LinqService).sql | 26 + ...sTestAsync(SqlServer.2008.LinqService).sql | 34 ++ ...tTestAsync(SqlServer.2008.LinqService).sql | 24 + ...TestAsync2(SqlServer.2008.LinqService).sql | 24 + ...TestAsync1(SqlServer.2008.LinqService).sql | 26 + ...TestAsync2(SqlServer.2008.LinqService).sql | 26 + ...xTestAsync(SqlServer.2008.LinqService).sql | 24 + ...TestAsync2(SqlServer.2008.LinqService).sql | 24 + ...icateAsync(SqlServer.2008.LinqService).sql | 178 +------ ...icateAsync(SqlServer.2008.LinqService).sql | 171 +------ ...icateAsync(SqlServer.2008.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2008.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2008.LinqService).sql | 171 +------ ...ectorAsync(SqlServer.2008.LinqService).sql | 171 +------ ...ectorAsync(SqlServer.2008.LinqService).sql | 171 +------ ...icateAsync(SqlServer.2008.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2008.LinqService).sql | 172 +------ ...ncat1Async(SqlServer.2008.LinqService).sql | 19 + ...ementAsync(SqlServer.2008.LinqService).sql | 99 ++++ ...teredAsync(SqlServer.2008.LinqService).sql | 84 ++++ ...ount1Async(SqlServer.2008.LinqService).sql | 8 + ...ount2Async(SqlServer.2008.LinqService).sql | 10 + ...yMax1Async(SqlServer.2008.LinqService).sql | 17 + ....Issue4602(SqlServer.2008.LinqService).sql | 54 +- ...4057_Async(SqlServer.2008.LinqService).sql | 29 ++ ...ransaction(SqlServer.2008.LinqService).sql | 29 ++ ...ssionAsync(SqlServer.2008.LinqService).sql | 25 + ...Cast1Async(SqlServer.2008.LinqService).sql | 11 + ...est18Async(SqlServer.2008.LinqService).sql | 14 + ...eter1Async(SqlServer.2008.LinqService).sql | 6 + ...ue3132Test(SqlServer.2008.LinqService).sql | 213 ++++++++ ...sync(SqlServer.2008.LinqService,False).sql | 24 + ...Async(SqlServer.2008.LinqService,True).sql | 24 + ...sync(SqlServer.2008.LinqService,False).sql | 24 + ...Async(SqlServer.2008.LinqService,True).sql | 24 + ...Skip1Async(SqlServer.2008.LinqService).sql | 93 +--- ...sync(SqlServer.2008.LinqService,False).sql | 18 + ...Async(SqlServer.2008.LinqService,True).sql | 22 + ...sync(SqlServer.2008.LinqService,False).sql | 11 + ...Async(SqlServer.2008.LinqService,True).sql | 11 + ...sync(SqlServer.2008.LinqService,False).sql | 11 + ...Async(SqlServer.2008.LinqService,True).sql | 13 + ...sync(SqlServer.2008.LinqService,False).sql | 11 + ...Async(SqlServer.2008.LinqService,True).sql | 13 + ...sync(SqlServer.2008.LinqService,False).sql | 9 + ...Async(SqlServer.2008.LinqService,True).sql | 11 + ...er.2008.LinqService,False,False,False).sql | 17 + ...ver.2008.LinqService,False,False,True).sql | 17 + ...ver.2008.LinqService,False,True,False).sql | 17 + ...rver.2008.LinqService,False,True,True).sql | 17 + ...able1Async(SqlServer.2008.LinqService).sql | 35 ++ ...TableAsync(SqlServer.2008.LinqService).sql | 33 ++ ...eNameAsync(SqlServer.2008.LinqService).sql | 90 ++++ ...ncTest(SqlServer.2008.LinqService,100).sql | 19 + ...ncTest(SqlServer.2008.LinqService,200).sql | 19 + ...Record(SqlServer.2008.LinqService,100).sql | 13 + ...Record(SqlServer.2008.LinqService,200).sql | 13 + ...ncTest(SqlServer.2008.LinqService,100).sql | 15 + ...ncTest(SqlServer.2008.LinqService,200).sql | 15 + ...Record(SqlServer.2008.LinqService,100).sql | 15 + ...Record(SqlServer.2008.LinqService,200).sql | 15 + ...ncTest(SqlServer.2008.LinqService,100).sql | 21 + ...ncTest(SqlServer.2008.LinqService,200).sql | 21 + ...ncTest(SqlServer.2008.LinqService,100).sql | 12 + ...ncTest(SqlServer.2008.LinqService,200).sql | 12 + ...Record(SqlServer.2008.LinqService,100).sql | 12 + ...Record(SqlServer.2008.LinqService,200).sql | 12 + ...sert2Async(SqlServer.2008.LinqService).sql | 46 ++ ...sert3Async(SqlServer.2008.LinqService).sql | 48 ++ ...sert4Async(SqlServer.2008.LinqService).sql | 48 ++ ...eNameAsync(SqlServer.2008.LinqService).sql | 70 +++ ...lace1Async(SqlServer.2008.LinqService).sql | 97 ++++ ...eNameAsync(SqlServer.2008.LinqService).sql | 151 ++++++ ...date3Async(SqlServer.2008.LinqService).sql | 97 ++++ ...ate3xAsync(SqlServer.2008.LinqService).sql | 103 ++++ ...tity1Async(SqlServer.2008.LinqService).sql | 14 + ...tity2Async(SqlServer.2008.LinqService).sql | 14 + ...tity4Async(SqlServer.2008.LinqService).sql | 32 ++ ...syncTest(SqlServer.2008.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2008.LinqService,2).sql | 43 +- ...syncTest(SqlServer.2008.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2008.LinqService,2).sql | 43 +- ...tAsync(SqlServer.2008.LinqService,100).sql | 24 + ...tAsync(SqlServer.2008.LinqService,200).sql | 24 + ...Record(SqlServer.2008.LinqService,100).sql | 24 + ...Record(SqlServer.2008.LinqService,200).sql | 24 + ...syncTest(SqlServer.2008.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2008.LinqService,2).sql | 43 +- ...syncTest(SqlServer.2008.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2008.LinqService,2).sql | 43 +- ...tFullAsync(SqlServer.2008.LinqService).sql | 54 ++ ...ctionAsync(SqlServer.2008.LinqService).sql | 53 ++ ...mQueryAsyn(SqlServer.2008.LinqService).sql | 40 ++ ...mTableAsyn(SqlServer.2008.LinqService).sql | 38 ++ ...ate12Async(SqlServer.2008.LinqService).sql | 13 + ...date1Async(SqlServer.2008.LinqService).sql | 54 ++ ...date2Async(SqlServer.2008.LinqService).sql | 54 ++ ...date4Async(SqlServer.2008.LinqService).sql | 55 +++ ...tion1Async(SqlServer.2008.LinqService).sql | 41 ++ ...n1AsyncOld(SqlServer.2008.LinqService).sql | 41 ++ ...eNameAsync(SqlServer.2008.LinqService).sql | 106 ++++ ...plex1Async(SqlServer.2008.LinqService).sql | 55 +++ ...oTestAsync(SqlServer.2008.LinqService).sql | 23 + ...tTestAsync(SqlServer.2008.LinqService).sql | 458 +---------------- ...ngleRecord(SqlServer.2008.LinqService).sql | 460 +----------------- ...oTestAsync(SqlServer.2008.LinqService).sql | 23 + ...tTestAsync(SqlServer.2008.LinqService).sql | 455 +---------------- ...nateUpdate(SqlServer.2008.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2008.LinqService).sql | 456 +---------------- ...WithoutOld(SqlServer.2008.LinqService).sql | 454 +---------------- ...nateUpdate(SqlServer.2008.LinqService).sql | 453 +---------------- ...ngleRecord(SqlServer.2008.LinqService).sql | 455 +---------------- ...oTestAsync(SqlServer.2008.LinqService).sql | 23 + ...tTestAsync(SqlServer.2008.LinqService).sql | 458 +---------------- ...ngleRecord(SqlServer.2008.LinqService).sql | 460 +----------------- ...oTestAsync(SqlServer.2008.LinqService).sql | 23 + ...tTestAsync(SqlServer.2008.LinqService).sql | 455 +---------------- ...nateUpdate(SqlServer.2008.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2008.LinqService).sql | 456 +---------------- ...WithoutOld(SqlServer.2008.LinqService).sql | 454 +---------------- ...nateUpdate(SqlServer.2008.LinqService).sql | 453 +---------------- ...ngleRecord(SqlServer.2008.LinqService).sql | 455 +---------------- ...oTestAsync(SqlServer.2008.LinqService).sql | 21 + ...tTestAsync(SqlServer.2008.LinqService).sql | 235 +-------- ...ngleRecord(SqlServer.2008.LinqService).sql | 235 +-------- ...tTestAsync(SqlServer.2008.LinqService).sql | 231 +-------- ...ngleRecord(SqlServer.2008.LinqService).sql | 231 +-------- ...WithoutOld(SqlServer.2008.LinqService).sql | 230 +-------- ...ngleRecord(SqlServer.2008.LinqService).sql | 230 +-------- ...tIntoAsync(SqlServer.2008.LinqService).sql | 21 + ...oTestAsync(SqlServer.2008.LinqService).sql | 22 + ...tTestAsync(SqlServer.2008.LinqService).sql | 236 +-------- ...ngleRecord(SqlServer.2008.LinqService).sql | 236 +-------- ...tTestAsync(SqlServer.2008.LinqService).sql | 232 +-------- ...ngleRecord(SqlServer.2008.LinqService).sql | 232 +-------- ...WithoutOld(SqlServer.2008.LinqService).sql | 231 +-------- ...ngleRecord(SqlServer.2008.LinqService).sql | 231 +-------- ...tIntoAsync(SqlServer.2008.LinqService).sql | 22 + ...l4Async(SqlServer.2008.MS.LinqService).sql | 17 + ...y2Async(SqlServer.2008.MS.LinqService).sql | 30 ++ ...le1Test(SqlServer.2008.MS.LinqService).sql | 9 + ...le2Test(SqlServer.2008.MS.LinqService).sql | 11 + ...st1Test(SqlServer.2008.MS.LinqService).sql | 9 + ...st2Test(SqlServer.2008.MS.LinqService).sql | 11 + ...yncTest(SqlServer.2008.MS.LinqService).sql | 17 + ...yncTest(SqlServer.2008.MS.LinqService).sql | 14 + ...kipTest(SqlServer.2008.MS.LinqService).sql | 24 + ...Default(SqlServer.2008.MS.LinqService).sql | 19 + ...yncTest(SqlServer.2008.MS.LinqService).sql | 21 + ...yncTest(SqlServer.2008.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2008.MS.LinqService).sql | 38 ++ ...tAsync2(SqlServer.2008.MS.LinqService).sql | 38 ++ ...ncdTest(SqlServer.2008.MS.LinqService).sql | 15 + ...t3Async(SqlServer.2008.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2008.MS.LinqService).sql | 34 ++ ...stAsync(SqlServer.2008.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2008.MS.LinqService).sql | 24 + ...tAsync1(SqlServer.2008.MS.LinqService).sql | 26 + ...tAsync2(SqlServer.2008.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2008.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2008.MS.LinqService).sql | 24 + ...teAsync(SqlServer.2008.MS.LinqService).sql | 178 +------ ...teAsync(SqlServer.2008.MS.LinqService).sql | 171 +------ ...teAsync(SqlServer.2008.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2008.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2008.MS.LinqService).sql | 171 +------ ...orAsync(SqlServer.2008.MS.LinqService).sql | 171 +------ ...orAsync(SqlServer.2008.MS.LinqService).sql | 171 +------ ...teAsync(SqlServer.2008.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2008.MS.LinqService).sql | 172 +------ ...t1Async(SqlServer.2008.MS.LinqService).sql | 19 + ...ntAsync(SqlServer.2008.MS.LinqService).sql | 99 ++++ ...edAsync(SqlServer.2008.MS.LinqService).sql | 84 ++++ ...t1Async(SqlServer.2008.MS.LinqService).sql | 8 + ...t2Async(SqlServer.2008.MS.LinqService).sql | 10 + ...x1Async(SqlServer.2008.MS.LinqService).sql | 17 + ...sue4602(SqlServer.2008.MS.LinqService).sql | 54 +- ...7_Async(SqlServer.2008.MS.LinqService).sql | 29 ++ ...saction(SqlServer.2008.MS.LinqService).sql | 29 ++ ...onAsync(SqlServer.2008.MS.LinqService).sql | 25 + ...t1Async(SqlServer.2008.MS.LinqService).sql | 11 + ...18Async(SqlServer.2008.MS.LinqService).sql | 14 + ...r1Async(SqlServer.2008.MS.LinqService).sql | 6 + ...132Test(SqlServer.2008.MS.LinqService).sql | 213 ++++++++ ...c(SqlServer.2008.MS.LinqService,False).sql | 24 + ...nc(SqlServer.2008.MS.LinqService,True).sql | 24 + ...c(SqlServer.2008.MS.LinqService,False).sql | 24 + ...nc(SqlServer.2008.MS.LinqService,True).sql | 24 + ...p1Async(SqlServer.2008.MS.LinqService).sql | 93 +--- ...c(SqlServer.2008.MS.LinqService,False).sql | 18 + ...nc(SqlServer.2008.MS.LinqService,True).sql | 22 + ...c(SqlServer.2008.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2008.MS.LinqService,True).sql | 11 + ...c(SqlServer.2008.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2008.MS.LinqService,True).sql | 13 + ...c(SqlServer.2008.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2008.MS.LinqService,True).sql | 13 + ...c(SqlServer.2008.MS.LinqService,False).sql | 9 + ...nc(SqlServer.2008.MS.LinqService,True).sql | 11 + ...2008.MS.LinqService,False,False,False).sql | 17 + ....2008.MS.LinqService,False,False,True).sql | 17 + ....2008.MS.LinqService,False,True,False).sql | 17 + ...r.2008.MS.LinqService,False,True,True).sql | 17 + ...e1Async(SqlServer.2008.MS.LinqService).sql | 35 ++ ...leAsync(SqlServer.2008.MS.LinqService).sql | 33 ++ ...meAsync(SqlServer.2008.MS.LinqService).sql | 90 ++++ ...est(SqlServer.2008.MS.LinqService,100).sql | 19 + ...est(SqlServer.2008.MS.LinqService,200).sql | 19 + ...ord(SqlServer.2008.MS.LinqService,100).sql | 13 + ...ord(SqlServer.2008.MS.LinqService,200).sql | 13 + ...est(SqlServer.2008.MS.LinqService,100).sql | 15 + ...est(SqlServer.2008.MS.LinqService,200).sql | 15 + ...ord(SqlServer.2008.MS.LinqService,100).sql | 15 + ...ord(SqlServer.2008.MS.LinqService,200).sql | 15 + ...est(SqlServer.2008.MS.LinqService,100).sql | 21 + ...est(SqlServer.2008.MS.LinqService,200).sql | 21 + ...est(SqlServer.2008.MS.LinqService,100).sql | 12 + ...est(SqlServer.2008.MS.LinqService,200).sql | 12 + ...ord(SqlServer.2008.MS.LinqService,100).sql | 12 + ...ord(SqlServer.2008.MS.LinqService,200).sql | 12 + ...t2Async(SqlServer.2008.MS.LinqService).sql | 46 ++ ...t3Async(SqlServer.2008.MS.LinqService).sql | 48 ++ ...t4Async(SqlServer.2008.MS.LinqService).sql | 48 ++ ...meAsync(SqlServer.2008.MS.LinqService).sql | 70 +++ ...e1Async(SqlServer.2008.MS.LinqService).sql | 97 ++++ ...meAsync(SqlServer.2008.MS.LinqService).sql | 151 ++++++ ...e3Async(SqlServer.2008.MS.LinqService).sql | 97 ++++ ...3xAsync(SqlServer.2008.MS.LinqService).sql | 103 ++++ ...y1Async(SqlServer.2008.MS.LinqService).sql | 14 + ...y2Async(SqlServer.2008.MS.LinqService).sql | 14 + ...y4Async(SqlServer.2008.MS.LinqService).sql | 32 ++ ...cTest(SqlServer.2008.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2008.MS.LinqService,2).sql | 43 +- ...cTest(SqlServer.2008.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2008.MS.LinqService,2).sql | 43 +- ...ync(SqlServer.2008.MS.LinqService,100).sql | 24 + ...ync(SqlServer.2008.MS.LinqService,200).sql | 24 + ...ord(SqlServer.2008.MS.LinqService,100).sql | 24 + ...ord(SqlServer.2008.MS.LinqService,200).sql | 24 + ...cTest(SqlServer.2008.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2008.MS.LinqService,2).sql | 43 +- ...cTest(SqlServer.2008.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2008.MS.LinqService,2).sql | 43 +- ...llAsync(SqlServer.2008.MS.LinqService).sql | 54 ++ ...onAsync(SqlServer.2008.MS.LinqService).sql | 53 ++ ...eryAsyn(SqlServer.2008.MS.LinqService).sql | 40 ++ ...bleAsyn(SqlServer.2008.MS.LinqService).sql | 38 ++ ...12Async(SqlServer.2008.MS.LinqService).sql | 13 + ...e1Async(SqlServer.2008.MS.LinqService).sql | 54 ++ ...e2Async(SqlServer.2008.MS.LinqService).sql | 54 ++ ...e4Async(SqlServer.2008.MS.LinqService).sql | 55 +++ ...n1Async(SqlServer.2008.MS.LinqService).sql | 41 ++ ...syncOld(SqlServer.2008.MS.LinqService).sql | 41 ++ ...meAsync(SqlServer.2008.MS.LinqService).sql | 106 ++++ ...x1Async(SqlServer.2008.MS.LinqService).sql | 55 +++ ...stAsync(SqlServer.2008.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2008.MS.LinqService).sql | 458 +---------------- ...eRecord(SqlServer.2008.MS.LinqService).sql | 460 +----------------- ...stAsync(SqlServer.2008.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2008.MS.LinqService).sql | 455 +---------------- ...eUpdate(SqlServer.2008.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2008.MS.LinqService).sql | 456 +---------------- ...houtOld(SqlServer.2008.MS.LinqService).sql | 454 +---------------- ...eUpdate(SqlServer.2008.MS.LinqService).sql | 453 +---------------- ...eRecord(SqlServer.2008.MS.LinqService).sql | 455 +---------------- ...stAsync(SqlServer.2008.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2008.MS.LinqService).sql | 458 +---------------- ...eRecord(SqlServer.2008.MS.LinqService).sql | 460 +----------------- ...stAsync(SqlServer.2008.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2008.MS.LinqService).sql | 455 +---------------- ...eUpdate(SqlServer.2008.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2008.MS.LinqService).sql | 456 +---------------- ...houtOld(SqlServer.2008.MS.LinqService).sql | 454 +---------------- ...eUpdate(SqlServer.2008.MS.LinqService).sql | 453 +---------------- ...eRecord(SqlServer.2008.MS.LinqService).sql | 455 +---------------- ...stAsync(SqlServer.2008.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2008.MS.LinqService).sql | 235 +-------- ...eRecord(SqlServer.2008.MS.LinqService).sql | 235 +-------- ...stAsync(SqlServer.2008.MS.LinqService).sql | 231 +-------- ...eRecord(SqlServer.2008.MS.LinqService).sql | 231 +-------- ...houtOld(SqlServer.2008.MS.LinqService).sql | 230 +-------- ...eRecord(SqlServer.2008.MS.LinqService).sql | 230 +-------- ...toAsync(SqlServer.2008.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2008.MS.LinqService).sql | 22 + ...stAsync(SqlServer.2008.MS.LinqService).sql | 236 +-------- ...eRecord(SqlServer.2008.MS.LinqService).sql | 236 +-------- ...stAsync(SqlServer.2008.MS.LinqService).sql | 232 +-------- ...eRecord(SqlServer.2008.MS.LinqService).sql | 232 +-------- ...houtOld(SqlServer.2008.MS.LinqService).sql | 231 +-------- ...eRecord(SqlServer.2008.MS.LinqService).sql | 231 +-------- ...toAsync(SqlServer.2008.MS.LinqService).sql | 22 + ...inq.AsyncTests.Test(SqlServer.2008.MS).sql | 18 + ...nq.AsyncTests.Test1(SqlServer.2008.MS).sql | 9 + ...ncTests.TestForEach(SqlServer.2008.MS).sql | 9 + ...s.Linq.AsyncTests.Test(SqlServer.2008).sql | 18 + ....Linq.AsyncTests.Test1(SqlServer.2008).sql | 9 + ...AsyncTests.TestForEach(SqlServer.2008).sql | 9 + 312 files changed, 8182 insertions(+), 22792 deletions(-) create mode 100644 SqlServer.2008.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.LinqService,False).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.LinqService,True).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.LinqService,False).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.LinqService,True).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.LinqService,False).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.LinqService,True).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.LinqService,False).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.LinqService,True).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.LinqService,False).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.LinqService,True).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.LinqService,False).sql create mode 100644 SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.LinqService,True).sql create mode 100644 SqlServer.2008.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2008.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.MS.LinqService,False).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.MS.LinqService,True).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.MS.LinqService,False).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.MS.LinqService,True).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.MS.LinqService,False).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.MS.LinqService,True).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.MS.LinqService,False).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.MS.LinqService,True).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.MS.LinqService,False).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.MS.LinqService,True).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.MS.LinqService,False).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.MS.LinqService,True).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2008.MS.LinqService).sql create mode 100644 SqlServer.2008.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2008.MS).sql create mode 100644 SqlServer.2008.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2008.MS).sql create mode 100644 SqlServer.2008.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2008.MS).sql create mode 100644 SqlServer.2008/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2008).sql create mode 100644 SqlServer.2008/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2008).sql create mode 100644 SqlServer.2008/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2008).sql diff --git a/SqlServer.2008.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..b2b4fa632cd0 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2008.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..9feed2b9cc35 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..5396c5865d72 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2008.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..145db1d15eb6 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2008.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..5396c5865d72 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2008.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..145db1d15eb6 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2008.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..c06f49b737af --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2008.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..6e62a6edb768 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2008.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2008.LinqService).sql index 6a6fd2870c15..1985460f0580 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2008.LinqService).sql @@ -22,3 +22,27 @@ WHERE ORDER BY [t2].[ParentID] +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t2].[ParentID], + [t2].[Value1] +FROM + ( + SELECT + [t1].[ParentID], + [t1].[Value1], + ROW_NUMBER() OVER (ORDER BY [t1].[ParentID]) as [RN] + FROM + [Parent] [t1] + ) [t2] +WHERE + [t2].[RN] > @skip AND [t2].[RN] <= (@skip + @take) +ORDER BY + [t2].[ParentID] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..a8e3d1639e5c --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2008.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..0944ffbc3560 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2008.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..0944ffbc3560 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2008.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..19d26bd3241d --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2008.LinqService).sql @@ -0,0 +1,38 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..19d26bd3241d --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2008.LinqService).sql @@ -0,0 +1,38 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..291b90a9eae1 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2008.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..58b73a961527 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..51b3ec422806 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2008.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..8838b9ce0dfd --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2008.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..8838b9ce0dfd --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2008.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..d680756816bb --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2008.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..d680756816bb --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2008.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..d0cfd97e8c98 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2008.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..d0cfd97e8c98 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2008.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2008.LinqService).sql index d98735b53f9f..bf7e347fc9b6 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2008.LinqService).sql @@ -1,163 +1,19 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ) + THEN 1 + ELSE 0 + END diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2008.LinqService).sql index d98735b53f9f..db559d695326 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2008.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2008.LinqService).sql index d98735b53f9f..20b7a70dcd6b 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2008.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2008.LinqService).sql index d98735b53f9f..20b7a70dcd6b 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2008.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2008.LinqService).sql index d98735b53f9f..db559d695326 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2008.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2008.LinqService).sql index d98735b53f9f..91ca171d36c3 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2008.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2008.LinqService).sql index d98735b53f9f..c793a6d3d535 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2008.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2008.LinqService).sql index d98735b53f9f..80d8138cdddb 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2008.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2008.LinqService).sql index d98735b53f9f..80d8138cdddb 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2008.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2008.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..96cd72f433fb --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2008.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2008.LinqService).sql index 89df8fac54f7..7480a17261c4 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2008.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2008 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008 diff --git a/SqlServer.2008.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2008.LinqService).sql index f8e9dcbfb392..2408500744e5 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2008.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2008 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008 diff --git a/SqlServer.2008.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..52bd3ba1c6a5 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..f8892f97ab4a --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2008.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..a27f34adb80c --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2008.LinqService).sql index 1f17f7951f74..494abe22709f 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2008.LinqService).sql @@ -1,47 +1,11 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] +-- SqlServer.2008 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2008.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2008.LinqService).sql index 1fe130d9e133..86731b9c4b1f 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2008.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2008 (asynchronously) diff --git a/SqlServer.2008.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2008.LinqService).sql index a7ab930bda3b..9e25619636b9 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2008.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2008 (asynchronously) diff --git a/SqlServer.2008.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..fb3dd723f989 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2008.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..b0208a77d313 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2008.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..89f72e55f6e0 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2008.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..066dd9661db7 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2008.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..c25cdc7c52da --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2008.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.LinqService,False).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.LinqService,False).sql new file mode 100644 index 000000000000..f50862b3579a --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.LinqService,False).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.LinqService,True).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.LinqService,True).sql new file mode 100644 index 000000000000..f50862b3579a --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.LinqService,True).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.LinqService,False).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.LinqService,False).sql new file mode 100644 index 000000000000..f50862b3579a --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.LinqService,False).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.LinqService,True).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.LinqService,True).sql new file mode 100644 index 000000000000..f50862b3579a --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.LinqService,True).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2008.LinqService).sql index c69666b5211f..a7149beeb7bf 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2008.LinqService).sql @@ -1,77 +1,22 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] +-- SqlServer.2008 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @skip_1 Int -- Int32 +SET @skip_1 = 2 + +SELECT + [t2].[Value_1] +FROM ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] + SELECT + [t1].[Value] as [Value_1], + ROW_NUMBER() OVER (ORDER BY [t1].[Value]) as [RN] + FROM + [TakeSkipClass] [t1] + ) [t2] +WHERE + [t2].[RN] > @skip + @skip_1 +ORDER BY + [t2].[Value_1] diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.LinqService,False).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.LinqService,False).sql index ee4f8fe5793e..2273c3039f84 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.LinqService,False).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.LinqService,True).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.LinqService,True).sql index 955cf5457b1e..75997c29d4ea 100644 --- a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.LinqService,True).sql +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.LinqService,False).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.LinqService,False).sql new file mode 100644 index 000000000000..a6acfcb2b5ca --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.LinqService,True).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.LinqService,True).sql new file mode 100644 index 000000000000..a6acfcb2b5ca --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.LinqService,False).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.LinqService,False).sql new file mode 100644 index 000000000000..c387815eb395 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.LinqService,True).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.LinqService,True).sql new file mode 100644 index 000000000000..eda3449f558d --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.LinqService,False).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.LinqService,False).sql new file mode 100644 index 000000000000..71d29fd61ce2 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.LinqService,True).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.LinqService,True).sql new file mode 100644 index 000000000000..0c7ebb7f98fc --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.LinqService,False).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.LinqService,False).sql new file mode 100644 index 000000000000..218c6b54acba --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.LinqService,True).sql b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.LinqService,True).sql new file mode 100644 index 000000000000..ed81b1d19ba3 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,False,False).sql b/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,False,False).sql index 9ae7927d610f..932e6515c5b3 100644 --- a/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,False,False).sql +++ b/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,False,False).sql @@ -4,3 +4,20 @@ IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2008 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,False,True).sql b/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,False,True).sql index 1e1b908a0258..70cad6c60b56 100644 --- a/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,False,True).sql +++ b/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,False,True).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2008 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,True,False).sql b/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,True,False).sql index 283cecbbc891..c4a8f5f60b9b 100644 --- a/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,True,False).sql +++ b/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,True,False).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2008 (asynchronously) + +CREATE TABLE [TestData]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,True,True).sql b/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,True,True).sql index 44f41283c5bf..ea5c595b382c 100644 --- a/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,True,True).sql +++ b/SqlServer.2008.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.LinqService,False,True,True).sql @@ -20,3 +20,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2008 (asynchronously) + +CREATE TABLE [TestData].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..a49cf27d2b44 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,35 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[TestTable]', N'U') IS NOT NULL) + DROP TABLE [TestTable] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2008.LinqService).sql index cdb837bc3682..d286df75e5d4 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2008.LinqService).sql @@ -1,4 +1,31 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2008 SELECT @@ -7,3 +34,9 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..928ef9e4c1fa --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2008.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.LinqService,100).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.LinqService,100).sql index 17fe41a9008b..98823ae5eeed 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.LinqService,100).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.LinqService,100).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.LinqService,200).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.LinqService,200).sql index 17fe41a9008b..98823ae5eeed 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.LinqService,200).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.LinqService,200).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.LinqService,100).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.LinqService,100).sql index e902d5ac33d1..7eabf400d065 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.LinqService,100).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.LinqService,200).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.LinqService,200).sql index e902d5ac33d1..7eabf400d065 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.LinqService,200).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.LinqService,100).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.LinqService,100).sql index 17fe41a9008b..d39a2ac7f699 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.LinqService,100).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.LinqService,200).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.LinqService,200).sql index 17fe41a9008b..55947a089322 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.LinqService,200).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,100).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,100).sql index e902d5ac33d1..caa5ed913241 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,100).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,200).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,200).sql index e902d5ac33d1..20cbd2c0b261 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,200).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.LinqService,100).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.LinqService,100).sql index 3fbf51be38cc..267f398cd215 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.LinqService,100).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2008 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.LinqService,200).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.LinqService,200).sql index 3fbf51be38cc..9164ea857a22 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.LinqService,200).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2008 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.LinqService,100).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.LinqService,100).sql index 17fe41a9008b..b5fba4e6a23b 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.LinqService,100).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.LinqService,200).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.LinqService,200).sql index 17fe41a9008b..b5fba4e6a23b 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.LinqService,200).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,100).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,100).sql index e902d5ac33d1..2d69c1981c81 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,100).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,200).sql b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,200).sql index e902d5ac33d1..2d69c1981c81 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,200).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..6ec818f6227d --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..aa61afbd5e85 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..aa61afbd5e85 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2008.LinqService).sql index d6f14b241069..27a501acda9d 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2008.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2008 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,33 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2008.LinqService).sql index c4a9419fac78..4af05d179f24 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2008.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..58a9a5ff5059 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2008.LinqService).sql @@ -0,0 +1,151 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2008.LinqService).sql index c4a9419fac78..7af61c4a5395 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2008.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2008.LinqService).sql index c4a9419fac78..1eb2d3a683db 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2008.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2008.LinqService).sql index d05ed1632ddb..d860c7186d2a 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2008.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2008 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2008.LinqService).sql index d05ed1632ddb..d860c7186d2a 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2008.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2008 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2008.LinqService).sql index 3bfd76a096d4..e7d2d7eb3d26 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2008.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2008 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2008 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.LinqService,1).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.LinqService,1).sql index 3b5b305537cc..4d4fb88e102e 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.LinqService,1).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008 +-- SqlServer.2008 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.LinqService,2).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.LinqService,2).sql index 3b5b305537cc..429b4ee3b399 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.LinqService,2).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008 +-- SqlServer.2008 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,1).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,1).sql index 3b5b305537cc..6b256b45529b 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,1).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008 +-- SqlServer.2008 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,2).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,2).sql index 3b5b305537cc..5a3150b28c4f 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,2).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008 +-- SqlServer.2008 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.LinqService,100).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.LinqService,100).sql index db0a47b38404..6e3352c863a7 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.LinqService,100).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2008 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.LinqService,200).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.LinqService,200).sql index 118931193858..14455c9d6b7b 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.LinqService,200).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2008 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.LinqService,100).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.LinqService,100).sql index 29249e6d6301..34011011b02a 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.LinqService,100).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2008 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.LinqService,200).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.LinqService,200).sql index 5ebdd2f068bd..6d4cbe6c50af 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.LinqService,200).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2008 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.LinqService,1).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.LinqService,1).sql index 3b5b305537cc..c59fb2b37cf4 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.LinqService,1).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008 +-- SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.LinqService,2).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.LinqService,2).sql index 3b5b305537cc..83b0adcdadcb 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.LinqService,2).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008 +-- SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,1).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,1).sql index 3b5b305537cc..6b256b45529b 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,1).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008 +-- SqlServer.2008 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,2).sql b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,2).sql index 3b5b305537cc..5a3150b28c4f 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,2).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008 +-- SqlServer.2008 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2008.LinqService).sql index efe533bafaa4..72fc9e086e58 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2008.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2008 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2008.LinqService).sql index efe533bafaa4..e36920a29e18 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2008.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2008 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2008.LinqService).sql index b472bfbdd67f..5cae1666120f 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2008.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2008 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2008 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2008.LinqService).sql index b472bfbdd67f..e5bc109da3a7 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2008.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2008 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2008 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..f9480de436d9 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..326c1266af18 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..326c1266af18 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..e2ef2d067764 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..82c4d386d7de --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2008.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..82c4d386d7de --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2008.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2008.LinqService).sql new file mode 100644 index 000000000000..d02f4f163e95 --- /dev/null +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2008.LinqService).sql @@ -0,0 +1,106 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2008.LinqService).sql index 5669d3f47f88..50dffec10feb 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2008.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql index be73ebecc049..cb18dbf79304 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2008 SELECT diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql index 3082db6bc688..9a4fcaba8fcb 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql index 3082db6bc688..bf260a9a0d7b 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2008.LinqService).sql index 4b95e1fce05e..e68d4303a0de 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2008.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2008 SELECT diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql index 3082db6bc688..85fde6b8cdee 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.LinqService).sql index 3082db6bc688..341a07e0b997 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql index 3082db6bc688..10d3d0b10001 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql index 3082db6bc688..26786b6266fa 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.LinqService).sql index 3082db6bc688..7c4d573e9d71 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql index 3082db6bc688..6e241bc81ad2 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql index be73ebecc049..cb18dbf79304 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2008 SELECT diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql index 3082db6bc688..9a4fcaba8fcb 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql index 3082db6bc688..bf260a9a0d7b 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2008.LinqService).sql index 4b95e1fce05e..e68d4303a0de 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2008.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2008 SELECT diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql index 3082db6bc688..85fde6b8cdee 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.LinqService).sql index 3082db6bc688..341a07e0b997 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql index 3082db6bc688..10d3d0b10001 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql index 3082db6bc688..26786b6266fa 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.LinqService).sql index 3082db6bc688..7c4d573e9d71 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql index 3082db6bc688..6e241bc81ad2 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql index 78ffdaf66793..f805581991e8 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2008 SELECT diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql index 2851dcd82425..aa5177b6a0cc 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql index 2851dcd82425..6368578f4ac3 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql index 2851dcd82425..c0071b1e2cf8 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql index 2851dcd82425..215f62a5c22e 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql index 2851dcd82425..e797d4bc3545 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.LinqService).sql index 2851dcd82425..7de8d8580e11 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2008.LinqService).sql index 78ffdaf66793..24de26a92d94 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2008.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2008 SELECT diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql index 78ffdaf66793..41575a66a8df 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2008.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2008 SELECT diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql index 2851dcd82425..8727eb36516d 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2008.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql index 2851dcd82425..1fb634c628ad 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql index 2851dcd82425..1b33ae58a82a 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2008.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql index 2851dcd82425..6c79c6f37020 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql index 2851dcd82425..422af9057276 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.LinqService).sql index 2851dcd82425..6d28288b23c8 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2008.LinqService).sql b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2008.LinqService).sql index 78ffdaf66793..ad45cf488023 100644 --- a/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2008.LinqService).sql +++ b/SqlServer.2008.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2008.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2008 SELECT diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..eae99aeba7fc --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..d2e1afa9acbb --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..6bf1631f0970 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..6f4359eb21de --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..6bf1631f0970 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..6f4359eb21de --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..137be768e2ab --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..ae865c61dc38 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2008.MS.LinqService).sql index c84dc9fadbab..17478319987a 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2008.MS.LinqService).sql @@ -22,3 +22,27 @@ WHERE ORDER BY [t2].[ParentID] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t2].[ParentID], + [t2].[Value1] +FROM + ( + SELECT + [t1].[ParentID], + [t1].[Value1], + ROW_NUMBER() OVER (ORDER BY [t1].[ParentID]) as [RN] + FROM + [Parent] [t1] + ) [t2] +WHERE + [t2].[RN] > @skip AND [t2].[RN] <= (@skip + @take) +ORDER BY + [t2].[ParentID] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..e0ec0d298c58 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..05ebefff9d9c --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..05ebefff9d9c --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..0ca886b217e8 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,38 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..0ca886b217e8 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,38 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..311e4bf1c346 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..d6b3318faa4c --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..7818987dab4a --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..405b13fbd63d --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..405b13fbd63d --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..0fd92399de33 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..0fd92399de33 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..a7b901e6b66d --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..a7b901e6b66d --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2008.MS.LinqService).sql index 91b5d1de62f3..681515413f5e 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2008.MS.LinqService).sql @@ -1,163 +1,19 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ) + THEN 1 + ELSE 0 + END diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2008.MS.LinqService).sql index 91b5d1de62f3..6b4d1ef73589 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2008.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2008.MS.LinqService).sql index 91b5d1de62f3..04d9069c90f6 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2008.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2008.MS.LinqService).sql index 91b5d1de62f3..04d9069c90f6 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2008.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2008.MS.LinqService).sql index 91b5d1de62f3..6b4d1ef73589 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2008.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2008.MS.LinqService).sql index 91b5d1de62f3..b75203e78ac6 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2008.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2008.MS.LinqService).sql index 91b5d1de62f3..700690b93f7b 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2008.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2008.MS.LinqService).sql index 91b5d1de62f3..4ae58882a2ca 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2008.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2008.MS.LinqService).sql index 91b5d1de62f3..4ae58882a2ca 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2008.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..502522bf7b3c --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2008.MS.LinqService).sql index 8ae9ebbcbd68..2a4a91d7f12b 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2008.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2008.MS.LinqService).sql index 11d2e7bb3379..e282338a3497 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2008.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..bd64c50ace91 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..c88e0c3a57de --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..ca6baf7e0e4f --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2008.MS.LinqService).sql index 39d109a010ed..cc2be9f9687c 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2008.MS.LinqService).sql @@ -1,47 +1,11 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2008.MS.LinqService).sql index e3fcb5094dc7..a45cc173ec8b 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2008.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2008.MS SqlServer.2008 (asynchronously) diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2008.MS.LinqService).sql index 28f851506d47..71b2916eccc9 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2008.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2008.MS SqlServer.2008 (asynchronously) diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..b99e2ed772cc --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..373d2943e89c --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..736ac9bfd784 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..79a2f884dc5c --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..d6d614ba37ec --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.MS.LinqService,False).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.MS.LinqService,False).sql new file mode 100644 index 000000000000..ef55654998b0 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.MS.LinqService,False).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.MS.LinqService,True).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.MS.LinqService,True).sql new file mode 100644 index 000000000000..ef55654998b0 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2008.MS.LinqService,True).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.MS.LinqService,False).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.MS.LinqService,False).sql new file mode 100644 index 000000000000..ef55654998b0 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.MS.LinqService,False).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.MS.LinqService,True).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.MS.LinqService,True).sql new file mode 100644 index 000000000000..ef55654998b0 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2008.MS.LinqService,True).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + ( + SELECT + [p].[ParentID], + [p].[Value1], + ROW_NUMBER() OVER (ORDER BY [p].[ParentID]) as [RN] + FROM + [Parent] [p] + WHERE + [p].[ParentID] > 1 + ) [t1] +WHERE + [t1].[RN] > @n AND [t1].[RN] <= (@n + 1) +ORDER BY + [t1].[ParentID] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2008.MS.LinqService).sql index cc6ef1e2bd90..55d5df895e4d 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2008.MS.LinqService).sql @@ -1,77 +1,22 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @skip_1 Int -- Int32 +SET @skip_1 = 2 + +SELECT + [t2].[Value_1] +FROM ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] + SELECT + [t1].[Value] as [Value_1], + ROW_NUMBER() OVER (ORDER BY [t1].[Value]) as [RN] + FROM + [TakeSkipClass] [t1] + ) [t2] +WHERE + [t2].[RN] > @skip + @skip_1 +ORDER BY + [t2].[Value_1] diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.MS.LinqService,False).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.MS.LinqService,False).sql index 74f6b64f5815..9381adfe8708 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.MS.LinqService,False).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.MS.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.MS.LinqService,True).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.MS.LinqService,True).sql index bd739493169a..8280e8ae07d4 100644 --- a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.MS.LinqService,True).sql +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2008.MS.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.MS.LinqService,False).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.MS.LinqService,False).sql new file mode 100644 index 000000000000..322db96b1f04 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.MS.LinqService,True).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.MS.LinqService,True).sql new file mode 100644 index 000000000000..322db96b1f04 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2008.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.MS.LinqService,False).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.MS.LinqService,False).sql new file mode 100644 index 000000000000..9606bafc7f40 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.MS.LinqService,True).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.MS.LinqService,True).sql new file mode 100644 index 000000000000..2348076ecb10 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2008.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.MS.LinqService,False).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.MS.LinqService,False).sql new file mode 100644 index 000000000000..950527ae6fd4 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.MS.LinqService,True).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.MS.LinqService,True).sql new file mode 100644 index 000000000000..696f53c82061 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2008.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.MS.LinqService,False).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.MS.LinqService,False).sql new file mode 100644 index 000000000000..fbd0422797e3 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.MS.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.MS.LinqService,True).sql b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.MS.LinqService,True).sql new file mode 100644 index 000000000000..e02fd09049bb --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2008.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,False,False).sql b/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,False,False).sql index 4e5ee574bcce..cde14b2ee3ec 100644 --- a/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,False,False).sql +++ b/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,False,False).sql @@ -4,3 +4,20 @@ IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,False,True).sql b/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,False,True).sql index 17d57240250a..cd5308c04ce0 100644 --- a/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,False,True).sql +++ b/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,False,True).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,True,False).sql b/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,True,False).sql index c42e324296a0..55e1f575aa6c 100644 --- a/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,True,False).sql +++ b/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,True,False).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +CREATE TABLE [TestDataMS]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,True,True).sql b/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,True,True).sql index 283834b5f793..f5805d83b2d6 100644 --- a/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,True,True).sql +++ b/SqlServer.2008.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2008.MS.LinqService,False,True,True).sql @@ -20,3 +20,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +CREATE TABLE [TestDataMS].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..4d0ca4f009f5 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,35 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[TestTable]', N'U') IS NOT NULL) + DROP TABLE [TestTable] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2008.MS.LinqService).sql index 29351392590d..54f5ac087936 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2008.MS.LinqService).sql @@ -1,4 +1,31 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 SELECT @@ -7,3 +34,9 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..9dc669474df5 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.MS.LinqService,100).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.MS.LinqService,100).sql index 4c5faa2153d3..ca59e3915d59 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.MS.LinqService,100).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.MS.LinqService,100).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.MS.LinqService,200).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.MS.LinqService,200).sql index 4c5faa2153d3..ca59e3915d59 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.MS.LinqService,200).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2008.MS.LinqService,200).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,100).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,100).sql index 7689ca6d5bcc..86662d3e99a1 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,100).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,200).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,200).sql index 7689ca6d5bcc..86662d3e99a1 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,200).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.MS.LinqService,100).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.MS.LinqService,100).sql index 4c5faa2153d3..1505f75f85b6 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.MS.LinqService,100).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.MS.LinqService,200).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.MS.LinqService,200).sql index 4c5faa2153d3..5019e41fdcc4 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.MS.LinqService,200).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2008.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,100).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,100).sql index 7689ca6d5bcc..bc91385adb49 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,100).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,200).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,200).sql index 7689ca6d5bcc..5d6de18ef070 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,200).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.MS.LinqService,100).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.MS.LinqService,100).sql index d30cb9cb5be6..f1103e56a7a5 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.MS.LinqService,100).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.MS.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.MS.LinqService,200).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.MS.LinqService,200).sql index d30cb9cb5be6..e1ec1efab5e0 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.MS.LinqService,200).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2008.MS.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.MS.LinqService,100).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.MS.LinqService,100).sql index 4c5faa2153d3..7440ee37b1e2 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.MS.LinqService,100).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.MS.LinqService,200).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.MS.LinqService,200).sql index 4c5faa2153d3..7440ee37b1e2 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.MS.LinqService,200).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2008.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,100).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,100).sql index 7689ca6d5bcc..98a90b71b5a8 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,100).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,200).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,200).sql index 7689ca6d5bcc..98a90b71b5a8 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,200).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2008.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..182f152ff069 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..f217d3dcb447 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..f217d3dcb447 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2008.MS.LinqService).sql index ba86f6189494..d0d6898fbf9c 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2008.MS.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,33 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2008.MS.LinqService).sql index e6edf24d1273..219f5541a79d 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2008.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..becf2c012696 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,151 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2008.MS.LinqService).sql index e6edf24d1273..520725de7114 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2008.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2008.MS.LinqService).sql index e6edf24d1273..cfbca9960e4c 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2008.MS.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2008.MS.LinqService).sql index 66de4f5b7b67..c04c71c1c6e7 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2008.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2008.MS.LinqService).sql index 66de4f5b7b67..c04c71c1c6e7 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2008.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2008.MS.LinqService).sql index 204c62e16437..9fa0da9f284a 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2008.MS.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,1).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,1).sql index 64ab7c97a940..be7209b6519f 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,1).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,2).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,2).sql index 64ab7c97a940..a73ab3f92d73 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,2).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,1).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,1).sql index 64ab7c97a940..b7e18ec6e7d5 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,1).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,2).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,2).sql index 64ab7c97a940..b5f96a0a973e 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,2).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.MS.LinqService,100).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.MS.LinqService,100).sql index 58c8f0cf8949..42ec64f1bbe2 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.MS.LinqService,100).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.MS.LinqService,200).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.MS.LinqService,200).sql index f787654c9ae8..0f28e76dd2e7 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.MS.LinqService,200).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2008.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.MS.LinqService,100).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.MS.LinqService,100).sql index 5848723dbdd2..c9bea952cb62 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.MS.LinqService,100).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.MS.LinqService,200).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.MS.LinqService,200).sql index d8930865eff2..72ecb7060e60 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.MS.LinqService,200).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2008.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,1).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,1).sql index 64ab7c97a940..6dc9e01d179a 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,1).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,2).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,2).sql index 64ab7c97a940..c6558bc0a333 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,2).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2008.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,1).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,1).sql index 64ab7c97a940..b7e18ec6e7d5 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,1).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,2).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,2).sql index 64ab7c97a940..b5f96a0a973e 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,2).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2008.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2008.MS.LinqService).sql index b4b52fc72352..3227233d5189 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2008.MS.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2008.MS.LinqService).sql index b4b52fc72352..dad0295c9f9a 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2008.MS.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2008.MS.LinqService).sql index 47e5bfaa2b63..f7633cde138d 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2008.MS.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2008.MS.LinqService).sql index 47e5bfaa2b63..147ad5a02acb 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2008.MS.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2008.MS SqlServer.2008 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..0afae108ac64 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..178a3f9031a6 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..178a3f9031a6 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..fbbf240f5175 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..db5c90571d08 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..db5c90571d08 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2008.MS.LinqService).sql new file mode 100644 index 000000000000..4b8441048dd9 --- /dev/null +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2008.MS.LinqService).sql @@ -0,0 +1,106 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2008.MS.LinqService).sql index f01948b677bb..4c1f597f2213 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2008.MS.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql index 50d127341311..ee30fa3b32bd 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 SELECT diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..6aa1927c90d4 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..f3e6d35048db 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql index ec7fd47d3390..a8be6f4150f3 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 SELECT diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..1bdd2e204894 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..4a061b6ba05a 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..418ba1ac020d 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..bd4e2a56a42b 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..1e01220a88e1 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..ac0ad39e5950 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql index 50d127341311..ee30fa3b32bd 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 SELECT diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..6aa1927c90d4 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..f3e6d35048db 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql index ec7fd47d3390..a8be6f4150f3 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 SELECT diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..1bdd2e204894 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..4a061b6ba05a 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..418ba1ac020d 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..bd4e2a56a42b 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..1e01220a88e1 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql index 37e9770e28ce..ac0ad39e5950 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2008.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql index 399117a3191c..048bd6c4822f 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 SELECT diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql index 7d13b6de349b..73f200657de9 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql index 7d13b6de349b..1bdda3dbbb2a 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql index 7d13b6de349b..7fecfd423ad9 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql index 7d13b6de349b..23c5a99dce51 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql index 7d13b6de349b..667a636f46d4 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.MS.LinqService).sql index 7d13b6de349b..b0a3311df551 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.MS.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2008.MS.LinqService).sql index 399117a3191c..d5716d96ed46 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2008.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 SELECT diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql index 399117a3191c..1a4a707a0206 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 SELECT diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql index 7d13b6de349b..fb76adbe5936 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql index 7d13b6de349b..487a308db1b3 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql index 7d13b6de349b..60342797eed3 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2008.MS.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql index 7d13b6de349b..fc385afa6b1d 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2008.MS.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql index 7d13b6de349b..fffd715bb4e6 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2008.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.MS.LinqService).sql index 7d13b6de349b..513bbda66430 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2008.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2008.MS SqlServer.2008 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2008.MS.LinqService).sql b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2008.MS.LinqService).sql index 399117a3191c..be11c14028eb 100644 --- a/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2008.MS.LinqService).sql +++ b/SqlServer.2008.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2008.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2008.MS SqlServer.2008 SELECT diff --git a/SqlServer.2008.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2008.MS).sql b/SqlServer.2008.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2008.MS).sql new file mode 100644 index 000000000000..ec9f16fc51bc --- /dev/null +++ b/SqlServer.2008.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2008.MS).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2008.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2008.MS).sql b/SqlServer.2008.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2008.MS).sql new file mode 100644 index 000000000000..6bf1631f0970 --- /dev/null +++ b/SqlServer.2008.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2008.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2008.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2008.MS).sql b/SqlServer.2008.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2008.MS).sql new file mode 100644 index 000000000000..6bf1631f0970 --- /dev/null +++ b/SqlServer.2008.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2008.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2008.MS SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2008/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2008).sql b/SqlServer.2008/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2008).sql new file mode 100644 index 000000000000..ac456d422be3 --- /dev/null +++ b/SqlServer.2008/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2008).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2008/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2008).sql b/SqlServer.2008/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2008).sql new file mode 100644 index 000000000000..5396c5865d72 --- /dev/null +++ b/SqlServer.2008/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2008).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2008/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2008).sql b/SqlServer.2008/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2008).sql new file mode 100644 index 000000000000..5396c5865d72 --- /dev/null +++ b/SqlServer.2008/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2008).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2008 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From 6887a235413566b39c8107207f6139c1caea6ee5 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:19:01 +0000 Subject: [PATCH 04/40] [Windows / SQL Server 2012] baselines --- ....All4Async(SqlServer.2012.LinqService).sql | 13 + ...upBy2Async(SqlServer.2012.LinqService).sql | 30 ++ ...rable1Test(SqlServer.2012.LinqService).sql | 9 + ...rable2Test(SqlServer.2012.LinqService).sql | 11 + ...eCast1Test(SqlServer.2012.LinqService).sql | 9 + ...eCast2Test(SqlServer.2012.LinqService).sql | 11 + ...sAsyncTest(SqlServer.2012.LinqService).sql | 13 + ...tAsyncTest(SqlServer.2012.LinqService).sql | 14 + ...keSkipTest(SqlServer.2012.LinqService).sql | 16 + ...tOrDefault(SqlServer.2012.LinqService).sql | 19 + ...pAsyncTest(SqlServer.2012.LinqService).sql | 21 + ...tAsyncTest(SqlServer.2012.LinqService).sql | 21 + ...yTestAsync(SqlServer.2012.LinqService).sql | 30 ++ ...TestAsync2(SqlServer.2012.LinqService).sql | 30 ++ ...AsyncdTest(SqlServer.2012.LinqService).sql | 15 + ...Test3Async(SqlServer.2012.LinqService).sql | 26 + ...sTestAsync(SqlServer.2012.LinqService).sql | 26 + ...tTestAsync(SqlServer.2012.LinqService).sql | 24 + ...TestAsync2(SqlServer.2012.LinqService).sql | 24 + ...TestAsync1(SqlServer.2012.LinqService).sql | 26 + ...TestAsync2(SqlServer.2012.LinqService).sql | 26 + ...xTestAsync(SqlServer.2012.LinqService).sql | 24 + ...TestAsync2(SqlServer.2012.LinqService).sql | 24 + ...icateAsync(SqlServer.2012.LinqService).sql | 174 +------ ...icateAsync(SqlServer.2012.LinqService).sql | 171 +------ ...icateAsync(SqlServer.2012.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2012.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2012.LinqService).sql | 171 +------ ...ectorAsync(SqlServer.2012.LinqService).sql | 171 +------ ...ectorAsync(SqlServer.2012.LinqService).sql | 171 +------ ...icateAsync(SqlServer.2012.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2012.LinqService).sql | 172 +------ ...ncat1Async(SqlServer.2012.LinqService).sql | 19 + ...ementAsync(SqlServer.2012.LinqService).sql | 99 ++++ ...teredAsync(SqlServer.2012.LinqService).sql | 84 ++++ ...ount1Async(SqlServer.2012.LinqService).sql | 8 + ...ount2Async(SqlServer.2012.LinqService).sql | 10 + ...yMax1Async(SqlServer.2012.LinqService).sql | 17 + ....Issue4602(SqlServer.2012.LinqService).sql | 54 +- ...4057_Async(SqlServer.2012.LinqService).sql | 29 ++ ...ransaction(SqlServer.2012.LinqService).sql | 29 ++ ...ssionAsync(SqlServer.2012.LinqService).sql | 25 + ...Cast1Async(SqlServer.2012.LinqService).sql | 11 + ...est18Async(SqlServer.2012.LinqService).sql | 14 + ...eter1Async(SqlServer.2012.LinqService).sql | 6 + ...ue3132Test(SqlServer.2012.LinqService).sql | 213 ++++++++ ...sync(SqlServer.2012.LinqService,False).sql | 16 + ...Async(SqlServer.2012.LinqService,True).sql | 16 + ...sync(SqlServer.2012.LinqService,False).sql | 16 + ...Async(SqlServer.2012.LinqService,True).sql | 16 + ...Skip1Async(SqlServer.2012.LinqService).sql | 86 +--- ...sync(SqlServer.2012.LinqService,False).sql | 18 + ...Async(SqlServer.2012.LinqService,True).sql | 22 + ...sync(SqlServer.2012.LinqService,False).sql | 11 + ...Async(SqlServer.2012.LinqService,True).sql | 11 + ...sync(SqlServer.2012.LinqService,False).sql | 11 + ...Async(SqlServer.2012.LinqService,True).sql | 13 + ...sync(SqlServer.2012.LinqService,False).sql | 11 + ...Async(SqlServer.2012.LinqService,True).sql | 13 + ...sync(SqlServer.2012.LinqService,False).sql | 9 + ...Async(SqlServer.2012.LinqService,True).sql | 11 + ...er.2012.LinqService,False,False,False).sql | 17 + ...ver.2012.LinqService,False,False,True).sql | 17 + ...ver.2012.LinqService,False,True,False).sql | 17 + ...rver.2012.LinqService,False,True,True).sql | 17 + ...able1Async(SqlServer.2012.LinqService).sql | 35 ++ ...TableAsync(SqlServer.2012.LinqService).sql | 33 ++ ...eNameAsync(SqlServer.2012.LinqService).sql | 90 ++++ ...ncTest(SqlServer.2012.LinqService,100).sql | 19 + ...ncTest(SqlServer.2012.LinqService,200).sql | 19 + ...Record(SqlServer.2012.LinqService,100).sql | 13 + ...Record(SqlServer.2012.LinqService,200).sql | 13 + ...ncTest(SqlServer.2012.LinqService,100).sql | 15 + ...ncTest(SqlServer.2012.LinqService,200).sql | 15 + ...Record(SqlServer.2012.LinqService,100).sql | 15 + ...Record(SqlServer.2012.LinqService,200).sql | 15 + ...ncTest(SqlServer.2012.LinqService,100).sql | 21 + ...ncTest(SqlServer.2012.LinqService,200).sql | 21 + ...ncTest(SqlServer.2012.LinqService,100).sql | 12 + ...ncTest(SqlServer.2012.LinqService,200).sql | 12 + ...Record(SqlServer.2012.LinqService,100).sql | 12 + ...Record(SqlServer.2012.LinqService,200).sql | 12 + ...sert2Async(SqlServer.2012.LinqService).sql | 46 ++ ...sert3Async(SqlServer.2012.LinqService).sql | 48 ++ ...sert4Async(SqlServer.2012.LinqService).sql | 48 ++ ...eNameAsync(SqlServer.2012.LinqService).sql | 70 +++ ...lace1Async(SqlServer.2012.LinqService).sql | 97 ++++ ...eNameAsync(SqlServer.2012.LinqService).sql | 151 ++++++ ...date3Async(SqlServer.2012.LinqService).sql | 97 ++++ ...ate3xAsync(SqlServer.2012.LinqService).sql | 103 ++++ ...tity1Async(SqlServer.2012.LinqService).sql | 14 + ...tity2Async(SqlServer.2012.LinqService).sql | 14 + ...tity4Async(SqlServer.2012.LinqService).sql | 32 ++ ...syncTest(SqlServer.2012.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2012.LinqService,2).sql | 43 +- ...syncTest(SqlServer.2012.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2012.LinqService,2).sql | 43 +- ...tAsync(SqlServer.2012.LinqService,100).sql | 24 + ...tAsync(SqlServer.2012.LinqService,200).sql | 24 + ...Record(SqlServer.2012.LinqService,100).sql | 24 + ...Record(SqlServer.2012.LinqService,200).sql | 24 + ...syncTest(SqlServer.2012.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2012.LinqService,2).sql | 43 +- ...syncTest(SqlServer.2012.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2012.LinqService,2).sql | 43 +- ...tFullAsync(SqlServer.2012.LinqService).sql | 54 ++ ...ctionAsync(SqlServer.2012.LinqService).sql | 53 ++ ...mQueryAsyn(SqlServer.2012.LinqService).sql | 40 ++ ...mTableAsyn(SqlServer.2012.LinqService).sql | 38 ++ ...ate12Async(SqlServer.2012.LinqService).sql | 13 + ...date1Async(SqlServer.2012.LinqService).sql | 54 ++ ...date2Async(SqlServer.2012.LinqService).sql | 54 ++ ...date4Async(SqlServer.2012.LinqService).sql | 55 +++ ...tion1Async(SqlServer.2012.LinqService).sql | 41 ++ ...n1AsyncOld(SqlServer.2012.LinqService).sql | 41 ++ ...eNameAsync(SqlServer.2012.LinqService).sql | 106 ++++ ...plex1Async(SqlServer.2012.LinqService).sql | 55 +++ ...oTestAsync(SqlServer.2012.LinqService).sql | 23 + ...tTestAsync(SqlServer.2012.LinqService).sql | 458 +---------------- ...ngleRecord(SqlServer.2012.LinqService).sql | 460 +----------------- ...oTestAsync(SqlServer.2012.LinqService).sql | 23 + ...tTestAsync(SqlServer.2012.LinqService).sql | 455 +---------------- ...nateUpdate(SqlServer.2012.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2012.LinqService).sql | 456 +---------------- ...WithoutOld(SqlServer.2012.LinqService).sql | 454 +---------------- ...nateUpdate(SqlServer.2012.LinqService).sql | 453 +---------------- ...ngleRecord(SqlServer.2012.LinqService).sql | 455 +---------------- ...oTestAsync(SqlServer.2012.LinqService).sql | 23 + ...tTestAsync(SqlServer.2012.LinqService).sql | 458 +---------------- ...ngleRecord(SqlServer.2012.LinqService).sql | 460 +----------------- ...oTestAsync(SqlServer.2012.LinqService).sql | 23 + ...tTestAsync(SqlServer.2012.LinqService).sql | 455 +---------------- ...nateUpdate(SqlServer.2012.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2012.LinqService).sql | 456 +---------------- ...WithoutOld(SqlServer.2012.LinqService).sql | 454 +---------------- ...nateUpdate(SqlServer.2012.LinqService).sql | 453 +---------------- ...ngleRecord(SqlServer.2012.LinqService).sql | 455 +---------------- ...oTestAsync(SqlServer.2012.LinqService).sql | 21 + ...tTestAsync(SqlServer.2012.LinqService).sql | 235 +-------- ...ngleRecord(SqlServer.2012.LinqService).sql | 235 +-------- ...tTestAsync(SqlServer.2012.LinqService).sql | 231 +-------- ...ngleRecord(SqlServer.2012.LinqService).sql | 231 +-------- ...WithoutOld(SqlServer.2012.LinqService).sql | 230 +-------- ...ngleRecord(SqlServer.2012.LinqService).sql | 230 +-------- ...tIntoAsync(SqlServer.2012.LinqService).sql | 21 + ...oTestAsync(SqlServer.2012.LinqService).sql | 22 + ...tTestAsync(SqlServer.2012.LinqService).sql | 236 +-------- ...ngleRecord(SqlServer.2012.LinqService).sql | 236 +-------- ...tTestAsync(SqlServer.2012.LinqService).sql | 232 +-------- ...ngleRecord(SqlServer.2012.LinqService).sql | 232 +-------- ...WithoutOld(SqlServer.2012.LinqService).sql | 231 +-------- ...ngleRecord(SqlServer.2012.LinqService).sql | 231 +-------- ...tIntoAsync(SqlServer.2012.LinqService).sql | 22 + ...l4Async(SqlServer.2012.MS.LinqService).sql | 13 + ...y2Async(SqlServer.2012.MS.LinqService).sql | 30 ++ ...le1Test(SqlServer.2012.MS.LinqService).sql | 9 + ...le2Test(SqlServer.2012.MS.LinqService).sql | 11 + ...st1Test(SqlServer.2012.MS.LinqService).sql | 9 + ...st2Test(SqlServer.2012.MS.LinqService).sql | 11 + ...yncTest(SqlServer.2012.MS.LinqService).sql | 13 + ...yncTest(SqlServer.2012.MS.LinqService).sql | 14 + ...kipTest(SqlServer.2012.MS.LinqService).sql | 16 + ...Default(SqlServer.2012.MS.LinqService).sql | 19 + ...yncTest(SqlServer.2012.MS.LinqService).sql | 21 + ...yncTest(SqlServer.2012.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2012.MS.LinqService).sql | 30 ++ ...tAsync2(SqlServer.2012.MS.LinqService).sql | 30 ++ ...ncdTest(SqlServer.2012.MS.LinqService).sql | 15 + ...t3Async(SqlServer.2012.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2012.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2012.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2012.MS.LinqService).sql | 24 + ...tAsync1(SqlServer.2012.MS.LinqService).sql | 26 + ...tAsync2(SqlServer.2012.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2012.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2012.MS.LinqService).sql | 24 + ...teAsync(SqlServer.2012.MS.LinqService).sql | 174 +------ ...teAsync(SqlServer.2012.MS.LinqService).sql | 171 +------ ...teAsync(SqlServer.2012.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2012.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2012.MS.LinqService).sql | 171 +------ ...orAsync(SqlServer.2012.MS.LinqService).sql | 171 +------ ...orAsync(SqlServer.2012.MS.LinqService).sql | 171 +------ ...teAsync(SqlServer.2012.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2012.MS.LinqService).sql | 172 +------ ...t1Async(SqlServer.2012.MS.LinqService).sql | 19 + ...ntAsync(SqlServer.2012.MS.LinqService).sql | 99 ++++ ...edAsync(SqlServer.2012.MS.LinqService).sql | 84 ++++ ...t1Async(SqlServer.2012.MS.LinqService).sql | 8 + ...t2Async(SqlServer.2012.MS.LinqService).sql | 10 + ...x1Async(SqlServer.2012.MS.LinqService).sql | 17 + ...sue4602(SqlServer.2012.MS.LinqService).sql | 54 +- ...7_Async(SqlServer.2012.MS.LinqService).sql | 29 ++ ...saction(SqlServer.2012.MS.LinqService).sql | 29 ++ ...onAsync(SqlServer.2012.MS.LinqService).sql | 25 + ...t1Async(SqlServer.2012.MS.LinqService).sql | 11 + ...18Async(SqlServer.2012.MS.LinqService).sql | 14 + ...r1Async(SqlServer.2012.MS.LinqService).sql | 6 + ...132Test(SqlServer.2012.MS.LinqService).sql | 213 ++++++++ ...c(SqlServer.2012.MS.LinqService,False).sql | 16 + ...nc(SqlServer.2012.MS.LinqService,True).sql | 16 + ...c(SqlServer.2012.MS.LinqService,False).sql | 16 + ...nc(SqlServer.2012.MS.LinqService,True).sql | 16 + ...p1Async(SqlServer.2012.MS.LinqService).sql | 86 +--- ...c(SqlServer.2012.MS.LinqService,False).sql | 18 + ...nc(SqlServer.2012.MS.LinqService,True).sql | 22 + ...c(SqlServer.2012.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2012.MS.LinqService,True).sql | 11 + ...c(SqlServer.2012.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2012.MS.LinqService,True).sql | 13 + ...c(SqlServer.2012.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2012.MS.LinqService,True).sql | 13 + ...c(SqlServer.2012.MS.LinqService,False).sql | 9 + ...nc(SqlServer.2012.MS.LinqService,True).sql | 11 + ...2012.MS.LinqService,False,False,False).sql | 17 + ....2012.MS.LinqService,False,False,True).sql | 17 + ....2012.MS.LinqService,False,True,False).sql | 17 + ...r.2012.MS.LinqService,False,True,True).sql | 17 + ...e1Async(SqlServer.2012.MS.LinqService).sql | 35 ++ ...leAsync(SqlServer.2012.MS.LinqService).sql | 33 ++ ...meAsync(SqlServer.2012.MS.LinqService).sql | 90 ++++ ...est(SqlServer.2012.MS.LinqService,100).sql | 19 + ...est(SqlServer.2012.MS.LinqService,200).sql | 19 + ...ord(SqlServer.2012.MS.LinqService,100).sql | 13 + ...ord(SqlServer.2012.MS.LinqService,200).sql | 13 + ...est(SqlServer.2012.MS.LinqService,100).sql | 15 + ...est(SqlServer.2012.MS.LinqService,200).sql | 15 + ...ord(SqlServer.2012.MS.LinqService,100).sql | 15 + ...ord(SqlServer.2012.MS.LinqService,200).sql | 15 + ...est(SqlServer.2012.MS.LinqService,100).sql | 21 + ...est(SqlServer.2012.MS.LinqService,200).sql | 21 + ...est(SqlServer.2012.MS.LinqService,100).sql | 12 + ...est(SqlServer.2012.MS.LinqService,200).sql | 12 + ...ord(SqlServer.2012.MS.LinqService,100).sql | 12 + ...ord(SqlServer.2012.MS.LinqService,200).sql | 12 + ...t2Async(SqlServer.2012.MS.LinqService).sql | 46 ++ ...t3Async(SqlServer.2012.MS.LinqService).sql | 48 ++ ...t4Async(SqlServer.2012.MS.LinqService).sql | 48 ++ ...meAsync(SqlServer.2012.MS.LinqService).sql | 70 +++ ...e1Async(SqlServer.2012.MS.LinqService).sql | 97 ++++ ...meAsync(SqlServer.2012.MS.LinqService).sql | 151 ++++++ ...e3Async(SqlServer.2012.MS.LinqService).sql | 97 ++++ ...3xAsync(SqlServer.2012.MS.LinqService).sql | 103 ++++ ...y1Async(SqlServer.2012.MS.LinqService).sql | 14 + ...y2Async(SqlServer.2012.MS.LinqService).sql | 14 + ...y4Async(SqlServer.2012.MS.LinqService).sql | 32 ++ ...cTest(SqlServer.2012.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2012.MS.LinqService,2).sql | 43 +- ...cTest(SqlServer.2012.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2012.MS.LinqService,2).sql | 43 +- ...ync(SqlServer.2012.MS.LinqService,100).sql | 24 + ...ync(SqlServer.2012.MS.LinqService,200).sql | 24 + ...ord(SqlServer.2012.MS.LinqService,100).sql | 24 + ...ord(SqlServer.2012.MS.LinqService,200).sql | 24 + ...cTest(SqlServer.2012.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2012.MS.LinqService,2).sql | 43 +- ...cTest(SqlServer.2012.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2012.MS.LinqService,2).sql | 43 +- ...llAsync(SqlServer.2012.MS.LinqService).sql | 54 ++ ...onAsync(SqlServer.2012.MS.LinqService).sql | 53 ++ ...eryAsyn(SqlServer.2012.MS.LinqService).sql | 40 ++ ...bleAsyn(SqlServer.2012.MS.LinqService).sql | 38 ++ ...12Async(SqlServer.2012.MS.LinqService).sql | 13 + ...e1Async(SqlServer.2012.MS.LinqService).sql | 54 ++ ...e2Async(SqlServer.2012.MS.LinqService).sql | 54 ++ ...e4Async(SqlServer.2012.MS.LinqService).sql | 55 +++ ...n1Async(SqlServer.2012.MS.LinqService).sql | 41 ++ ...syncOld(SqlServer.2012.MS.LinqService).sql | 41 ++ ...meAsync(SqlServer.2012.MS.LinqService).sql | 106 ++++ ...x1Async(SqlServer.2012.MS.LinqService).sql | 55 +++ ...stAsync(SqlServer.2012.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2012.MS.LinqService).sql | 458 +---------------- ...eRecord(SqlServer.2012.MS.LinqService).sql | 460 +----------------- ...stAsync(SqlServer.2012.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2012.MS.LinqService).sql | 455 +---------------- ...eUpdate(SqlServer.2012.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2012.MS.LinqService).sql | 456 +---------------- ...houtOld(SqlServer.2012.MS.LinqService).sql | 454 +---------------- ...eUpdate(SqlServer.2012.MS.LinqService).sql | 453 +---------------- ...eRecord(SqlServer.2012.MS.LinqService).sql | 455 +---------------- ...stAsync(SqlServer.2012.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2012.MS.LinqService).sql | 458 +---------------- ...eRecord(SqlServer.2012.MS.LinqService).sql | 460 +----------------- ...stAsync(SqlServer.2012.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2012.MS.LinqService).sql | 455 +---------------- ...eUpdate(SqlServer.2012.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2012.MS.LinqService).sql | 456 +---------------- ...houtOld(SqlServer.2012.MS.LinqService).sql | 454 +---------------- ...eUpdate(SqlServer.2012.MS.LinqService).sql | 453 +---------------- ...eRecord(SqlServer.2012.MS.LinqService).sql | 455 +---------------- ...stAsync(SqlServer.2012.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2012.MS.LinqService).sql | 235 +-------- ...eRecord(SqlServer.2012.MS.LinqService).sql | 235 +-------- ...stAsync(SqlServer.2012.MS.LinqService).sql | 231 +-------- ...eRecord(SqlServer.2012.MS.LinqService).sql | 231 +-------- ...houtOld(SqlServer.2012.MS.LinqService).sql | 230 +-------- ...eRecord(SqlServer.2012.MS.LinqService).sql | 230 +-------- ...toAsync(SqlServer.2012.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2012.MS.LinqService).sql | 22 + ...stAsync(SqlServer.2012.MS.LinqService).sql | 236 +-------- ...eRecord(SqlServer.2012.MS.LinqService).sql | 236 +-------- ...stAsync(SqlServer.2012.MS.LinqService).sql | 232 +-------- ...eRecord(SqlServer.2012.MS.LinqService).sql | 232 +-------- ...houtOld(SqlServer.2012.MS.LinqService).sql | 231 +-------- ...eRecord(SqlServer.2012.MS.LinqService).sql | 231 +-------- ...toAsync(SqlServer.2012.MS.LinqService).sql | 22 + ...inq.AsyncTests.Test(SqlServer.2012.MS).sql | 18 + ...nq.AsyncTests.Test1(SqlServer.2012.MS).sql | 9 + ...ncTests.TestForEach(SqlServer.2012.MS).sql | 9 + ...s.Linq.AsyncTests.Test(SqlServer.2012).sql | 18 + ....Linq.AsyncTests.Test1(SqlServer.2012).sql | 9 + ...AsyncTests.TestForEach(SqlServer.2012).sql | 9 + 312 files changed, 8014 insertions(+), 22794 deletions(-) create mode 100644 SqlServer.2012.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.LinqService,False).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.LinqService,True).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.LinqService,False).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.LinqService,True).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.LinqService,False).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.LinqService,True).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.LinqService,False).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.LinqService,True).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.LinqService,False).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.LinqService,True).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.LinqService,False).sql create mode 100644 SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.LinqService,True).sql create mode 100644 SqlServer.2012.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2012.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.MS.LinqService,False).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.MS.LinqService,True).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.MS.LinqService,False).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.MS.LinqService,True).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.MS.LinqService,False).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.MS.LinqService,True).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.MS.LinqService,False).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.MS.LinqService,True).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.MS.LinqService,False).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.MS.LinqService,True).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.MS.LinqService,False).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.MS.LinqService,True).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2012.MS.LinqService).sql create mode 100644 SqlServer.2012.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2012.MS).sql create mode 100644 SqlServer.2012.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2012.MS).sql create mode 100644 SqlServer.2012.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2012.MS).sql create mode 100644 SqlServer.2012/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2012).sql create mode 100644 SqlServer.2012/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2012).sql create mode 100644 SqlServer.2012/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2012).sql diff --git a/SqlServer.2012.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..4cc537004322 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.2012.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..3622dd6a57d4 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..1f0053160afb --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2012.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..1ea9b95ca469 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2012.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..1f0053160afb --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2012.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..1ea9b95ca469 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2012.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..0d68014ec153 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2012.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..76dab50ab2b5 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2012.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2012.LinqService).sql index ed54a09b4cae..77fca66fa5fd 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2012.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..618286e6b579 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2012.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..ef2e8e5561bb --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2012.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..ef2e8e5561bb --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2012.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..eed9f78ad40b --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2012.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..eed9f78ad40b --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2012.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..4e026f1b780b --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2012.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..e7f0fccf6931 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..247e94119ed7 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2012.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..1098b08a0ef0 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2012.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..1098b08a0ef0 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2012.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..27246b673225 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2012.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..27246b673225 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2012.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..dfea1abc9ce3 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2012.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..dfea1abc9ce3 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2012.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2012.LinqService).sql index cac712839513..ee402e9e54ac 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2012.LinqService).sql @@ -1,163 +1,15 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2012.LinqService).sql index cac712839513..7b43aa11cc6a 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2012.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2012.LinqService).sql index cac712839513..cdc4415638bf 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2012.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2012.LinqService).sql index cac712839513..cdc4415638bf 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2012.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2012.LinqService).sql index cac712839513..7b43aa11cc6a 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2012.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2012.LinqService).sql index cac712839513..669d55688356 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2012.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2012.LinqService).sql index cac712839513..a918543779e3 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2012.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2012.LinqService).sql index cac712839513..fe05516df1d2 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2012.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2012.LinqService).sql index cac712839513..fe05516df1d2 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2012.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2012.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..94b3e34395a8 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2012.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2012.LinqService).sql index 59cd08399aa0..b98045a3f93b 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2012.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2012 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012 diff --git a/SqlServer.2012.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2012.LinqService).sql index 4db6b7386b48..0c375820fc72 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2012.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2012 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012 diff --git a/SqlServer.2012.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..18688a18b807 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..753b4b5a01c6 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2012.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..c335d7d52a8a --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2012.LinqService).sql index 055990a05c7c..fea9694642ad 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2012.LinqService).sql @@ -1,47 +1,11 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] +-- SqlServer.2012 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2012.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2012.LinqService).sql index cabcd4171593..4f9381503ade 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2012.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2012 (asynchronously) diff --git a/SqlServer.2012.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2012.LinqService).sql index 1dc837fd34d0..a48bee0f450a 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2012.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2012 (asynchronously) diff --git a/SqlServer.2012.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..6cccf4b98e6d --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2012.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..cc9ef32f80f4 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2012.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..2388bd0f0567 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2012.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..91b8ad83827b --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2012.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..15c9fbc1b596 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2012.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.LinqService,False).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.LinqService,False).sql new file mode 100644 index 000000000000..2288a3dfdaf3 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.LinqService,True).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.LinqService,True).sql new file mode 100644 index 000000000000..2288a3dfdaf3 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.LinqService,False).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.LinqService,False).sql new file mode 100644 index 000000000000..2288a3dfdaf3 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.LinqService,True).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.LinqService,True).sql new file mode 100644 index 000000000000..2288a3dfdaf3 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2012.LinqService).sql index 24ba5fe8b4e8..d8e144843dab 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2012.LinqService).sql @@ -1,77 +1,13 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] +-- SqlServer.2012 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.LinqService,False).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.LinqService,False).sql index 3d64ed67bb57..daf62cb77860 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.LinqService,False).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.LinqService,True).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.LinqService,True).sql index c88dd1b7c370..2189bd2c7e51 100644 --- a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.LinqService,True).sql +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.LinqService,False).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.LinqService,False).sql new file mode 100644 index 000000000000..582ccc49245a --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.LinqService,True).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.LinqService,True).sql new file mode 100644 index 000000000000..582ccc49245a --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.LinqService,False).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.LinqService,False).sql new file mode 100644 index 000000000000..6695428cddb7 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.LinqService,True).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.LinqService,True).sql new file mode 100644 index 000000000000..09a7527d17ab --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.LinqService,False).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.LinqService,False).sql new file mode 100644 index 000000000000..9b8a95c7d981 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.LinqService,True).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.LinqService,True).sql new file mode 100644 index 000000000000..ef47f2777e17 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.LinqService,False).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.LinqService,False).sql new file mode 100644 index 000000000000..01efdf01dea8 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.LinqService,True).sql b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.LinqService,True).sql new file mode 100644 index 000000000000..87544b428aae --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,False,False).sql b/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,False,False).sql index cad821c38ba4..a116694f8368 100644 --- a/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,False,False).sql +++ b/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,False,False).sql @@ -4,3 +4,20 @@ IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2012 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,False,True).sql b/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,False,True).sql index b5f1112939e9..b234cd47ce7a 100644 --- a/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,False,True).sql +++ b/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,False,True).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2012 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,True,False).sql b/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,True,False).sql index cf3a49ce642b..98846a3a979f 100644 --- a/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,True,False).sql +++ b/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,True,False).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2012 (asynchronously) + +CREATE TABLE [TestData]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,True,True).sql b/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,True,True).sql index b98f10c1c6d8..6704dc083254 100644 --- a/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,True,True).sql +++ b/SqlServer.2012.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.LinqService,False,True,True).sql @@ -20,3 +20,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2012 (asynchronously) + +CREATE TABLE [TestData].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..abf8b5163d24 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,35 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[TestTable]', N'U') IS NOT NULL) + DROP TABLE [TestTable] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2012.LinqService).sql index 54bf07c53414..7dce450406b2 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2012.LinqService).sql @@ -1,4 +1,31 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2012 SELECT @@ -7,3 +34,9 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..1d62a3511f7b --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2012.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.LinqService,100).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.LinqService,100).sql index 422bc0f07888..d726be58a2b9 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.LinqService,100).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.LinqService,100).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.LinqService,200).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.LinqService,200).sql index 422bc0f07888..d726be58a2b9 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.LinqService,200).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.LinqService,200).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.LinqService,100).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.LinqService,100).sql index 52b81fc23a45..02265981ae84 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.LinqService,100).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.LinqService,200).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.LinqService,200).sql index 52b81fc23a45..02265981ae84 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.LinqService,200).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.LinqService,100).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.LinqService,100).sql index 422bc0f07888..ae5eae8eacb4 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.LinqService,100).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.LinqService,200).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.LinqService,200).sql index 422bc0f07888..c9d4c3bd70fe 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.LinqService,200).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,100).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,100).sql index 52b81fc23a45..76b01b349ca9 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,100).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,200).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,200).sql index 52b81fc23a45..61384de52c3a 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,200).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.LinqService,100).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.LinqService,100).sql index 9cb8547a556e..29f2bfb15646 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.LinqService,100).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2012 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.LinqService,200).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.LinqService,200).sql index 9cb8547a556e..641aaafd9564 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.LinqService,200).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2012 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.LinqService,100).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.LinqService,100).sql index 422bc0f07888..2f61812bf63f 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.LinqService,100).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.LinqService,200).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.LinqService,200).sql index 422bc0f07888..2f61812bf63f 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.LinqService,200).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,100).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,100).sql index 52b81fc23a45..77a76a997373 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,100).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,200).sql b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,200).sql index 52b81fc23a45..77a76a997373 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,200).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..11128ddbda9c --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..462edbabc68b --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..462edbabc68b --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2012.LinqService).sql index 0a27d7610f1f..85732e048808 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2012.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2012 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,33 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2012.LinqService).sql index 307771243298..a9e7129478e7 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2012.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..8e556b82330f --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2012.LinqService).sql @@ -0,0 +1,151 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2012.LinqService).sql index 307771243298..1fcaa74106c8 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2012.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2012.LinqService).sql index 307771243298..97e70cdbc929 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2012.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2012.LinqService).sql index 1e2ec1235dbd..ffb4cd6f8c1d 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2012.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2012 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2012.LinqService).sql index 1e2ec1235dbd..ffb4cd6f8c1d 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2012.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2012 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2012.LinqService).sql index 059ffda038db..7a0c9c750d59 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2012.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2012 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2012 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.LinqService,1).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.LinqService,1).sql index 5dee00e4ba61..cab187b10fb0 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.LinqService,1).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012 +-- SqlServer.2012 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.LinqService,2).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.LinqService,2).sql index 5dee00e4ba61..7c928a070ba2 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.LinqService,2).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012 +-- SqlServer.2012 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,1).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,1).sql index 5dee00e4ba61..21a09d2cf0ec 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,1).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012 +-- SqlServer.2012 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,2).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,2).sql index 5dee00e4ba61..1f3b9562fcf0 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,2).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012 +-- SqlServer.2012 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.LinqService,100).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.LinqService,100).sql index 3d588f45fc48..8d3433c2e03b 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.LinqService,100).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2012 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.LinqService,200).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.LinqService,200).sql index a5889dfe60fd..2437999847de 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.LinqService,200).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2012 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.LinqService,100).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.LinqService,100).sql index 3af27f65f0ce..abb76725e611 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.LinqService,100).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2012 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.LinqService,200).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.LinqService,200).sql index f8f94674953e..b7c10ee75527 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.LinqService,200).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2012 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.LinqService,1).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.LinqService,1).sql index 5dee00e4ba61..c8678b54adef 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.LinqService,1).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012 +-- SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.LinqService,2).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.LinqService,2).sql index 5dee00e4ba61..b1c3368e663e 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.LinqService,2).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012 +-- SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,1).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,1).sql index 5dee00e4ba61..21a09d2cf0ec 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,1).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012 +-- SqlServer.2012 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,2).sql b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,2).sql index 5dee00e4ba61..1f3b9562fcf0 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,2).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012 +-- SqlServer.2012 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2012.LinqService).sql index ba9d7812f6aa..2423d994a37f 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2012.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2012 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2012.LinqService).sql index ba9d7812f6aa..a1934e50df5f 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2012.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2012 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2012.LinqService).sql index 90b1f5c235ec..1c0063f8557e 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2012.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2012 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2012 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2012.LinqService).sql index 90b1f5c235ec..92d91eba4179 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2012.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2012 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2012 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..242dd78e32ec --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..7ede0eb998b7 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..7ede0eb998b7 --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..38be66da5fcf --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..6877e6993f7f --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2012.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..6877e6993f7f --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2012.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2012.LinqService).sql new file mode 100644 index 000000000000..56d88587a1fc --- /dev/null +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2012.LinqService).sql @@ -0,0 +1,106 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2012.LinqService).sql index 2236f821de99..2e6932429d42 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2012.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql index eb9d1fa0d03f..dedbb3bb4504 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2012 SELECT diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql index 9cc89719ab48..c5952697eef9 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql index 9cc89719ab48..2e79f8e90430 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2012.LinqService).sql index 795dde9954c9..b95c61902129 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2012.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2012 SELECT diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql index 9cc89719ab48..faf0ca6267f1 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.LinqService).sql index 9cc89719ab48..0fe05aced68c 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql index 9cc89719ab48..01705827a416 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql index 9cc89719ab48..3d208ee58bfa 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.LinqService).sql index 9cc89719ab48..7414ba7a5699 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql index 9cc89719ab48..42be3ee7bae1 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql index eb9d1fa0d03f..dedbb3bb4504 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2012 SELECT diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql index 9cc89719ab48..c5952697eef9 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql index 9cc89719ab48..2e79f8e90430 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2012.LinqService).sql index 795dde9954c9..b95c61902129 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2012.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2012 SELECT diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql index 9cc89719ab48..faf0ca6267f1 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.LinqService).sql index 9cc89719ab48..0fe05aced68c 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql index 9cc89719ab48..01705827a416 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql index 9cc89719ab48..3d208ee58bfa 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.LinqService).sql index 9cc89719ab48..7414ba7a5699 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql index 9cc89719ab48..42be3ee7bae1 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql index db46df5cf760..11f43b8d82b2 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2012 SELECT diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql index 48783e08c16c..2b12d8ccd1ec 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql index 48783e08c16c..5f9b663d61a2 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql index 48783e08c16c..24570cc1e514 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql index 48783e08c16c..2adba4354ae0 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql index 48783e08c16c..0db8001ebf9a 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.LinqService).sql index 48783e08c16c..9e80c9b55968 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2012.LinqService).sql index db46df5cf760..22d064773fe2 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2012.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2012 SELECT diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql index db46df5cf760..51f80f13f293 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2012.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2012 SELECT diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql index 48783e08c16c..33177906b7f1 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2012.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql index 48783e08c16c..0d08eaeef7b5 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql index 48783e08c16c..d21d0f0d10f4 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2012.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql index 48783e08c16c..09c01eb9b76a 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql index 48783e08c16c..68de63a61320 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.LinqService).sql index 48783e08c16c..a5b11fe99332 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2012.LinqService).sql b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2012.LinqService).sql index db46df5cf760..aede446b9608 100644 --- a/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2012.LinqService).sql +++ b/SqlServer.2012.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2012.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2012 SELECT diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..e9e75c4a8449 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..ddde0c129904 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..37987a6b588f --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..2998d1d96775 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..37987a6b588f --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..2998d1d96775 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..e1d5eafd2dc2 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..60590bed2b87 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2012.MS.LinqService).sql index 61f115e066ae..d9e51722b659 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2012.MS.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..61913a4e5d38 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..cdd4ba9cf7cd --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..cdd4ba9cf7cd --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..07eb655c2231 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..07eb655c2231 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..4fc3093eeab0 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..c7c608995251 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..3fe2436ce4cd --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..1d86877ddc07 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..1d86877ddc07 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..5e45fc70ae10 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..5e45fc70ae10 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..339c59303fed --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..339c59303fed --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2012.MS.LinqService).sql index 0da3299e84d3..522bc381e9eb 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2012.MS.LinqService).sql @@ -1,163 +1,15 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2012.MS.LinqService).sql index 0da3299e84d3..6f9d039b2712 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2012.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2012.MS.LinqService).sql index 0da3299e84d3..abe4cc97f39f 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2012.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2012.MS.LinqService).sql index 0da3299e84d3..abe4cc97f39f 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2012.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2012.MS.LinqService).sql index 0da3299e84d3..6f9d039b2712 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2012.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2012.MS.LinqService).sql index 0da3299e84d3..10589532a217 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2012.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2012.MS.LinqService).sql index 0da3299e84d3..364850ef8c7a 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2012.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2012.MS.LinqService).sql index 0da3299e84d3..a4e2c295291a 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2012.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2012.MS.LinqService).sql index 0da3299e84d3..a4e2c295291a 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2012.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..fad6d6855adb --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2012.MS.LinqService).sql index 4d7448c2bcbf..933c8e4c73f1 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2012.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2012.MS.LinqService).sql index c0a2704dc1ba..c167db599efe 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2012.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..c700dc618308 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..bed0b993f3ee --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..066afd4797ed --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2012.MS.LinqService).sql index 9d0bc9aa5112..f4bde1758581 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2012.MS.LinqService).sql @@ -1,47 +1,11 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2012.MS.LinqService).sql index 46250a3d2e13..ab5e7007f0ef 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2012.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2012.MS SqlServer.2012 (asynchronously) diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2012.MS.LinqService).sql index 692f263eb3a6..7c5dbbde3924 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2012.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2012.MS SqlServer.2012 (asynchronously) diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..610bcbc6e6cb --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..b5630e4e5972 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..be929b6efeed --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..189e94090c3a --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..2611af528222 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.MS.LinqService,False).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.MS.LinqService,False).sql new file mode 100644 index 000000000000..3acd865aee92 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.MS.LinqService,True).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.MS.LinqService,True).sql new file mode 100644 index 000000000000..3acd865aee92 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2012.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.MS.LinqService,False).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.MS.LinqService,False).sql new file mode 100644 index 000000000000..3acd865aee92 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.MS.LinqService,True).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.MS.LinqService,True).sql new file mode 100644 index 000000000000..3acd865aee92 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2012.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2012.MS.LinqService).sql index 0eba66b7984c..1965ad1b781c 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2012.MS.LinqService).sql @@ -1,77 +1,13 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.MS.LinqService,False).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.MS.LinqService,False).sql index 2c761a3fe839..ccc449dbf28c 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.MS.LinqService,False).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.MS.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.MS.LinqService,True).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.MS.LinqService,True).sql index a73df65e02d9..9fb675f0da6c 100644 --- a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.MS.LinqService,True).sql +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2012.MS.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.MS.LinqService,False).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.MS.LinqService,False).sql new file mode 100644 index 000000000000..5e2830a04aa0 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.MS.LinqService,True).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.MS.LinqService,True).sql new file mode 100644 index 000000000000..5e2830a04aa0 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2012.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.MS.LinqService,False).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.MS.LinqService,False).sql new file mode 100644 index 000000000000..6e9b4a21eedf --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.MS.LinqService,True).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.MS.LinqService,True).sql new file mode 100644 index 000000000000..355725622aea --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2012.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.MS.LinqService,False).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.MS.LinqService,False).sql new file mode 100644 index 000000000000..87c58df1a0ff --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.MS.LinqService,True).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.MS.LinqService,True).sql new file mode 100644 index 000000000000..9e35570f8b80 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2012.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.MS.LinqService,False).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.MS.LinqService,False).sql new file mode 100644 index 000000000000..83078c0524e9 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.MS.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.MS.LinqService,True).sql b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.MS.LinqService,True).sql new file mode 100644 index 000000000000..cae75ca9a04a --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2012.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,False,False).sql b/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,False,False).sql index ac9f46e51953..937fffdf189e 100644 --- a/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,False,False).sql +++ b/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,False,False).sql @@ -4,3 +4,20 @@ IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,False,True).sql b/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,False,True).sql index 6ecce601b464..945de5a0b0ab 100644 --- a/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,False,True).sql +++ b/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,False,True).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,True,False).sql b/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,True,False).sql index de26a1510a63..3e47316385df 100644 --- a/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,True,False).sql +++ b/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,True,False).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +CREATE TABLE [TestDataMS]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,True,True).sql b/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,True,True).sql index da7b255f4bb9..83eed38e22e0 100644 --- a/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,True,True).sql +++ b/SqlServer.2012.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2012.MS.LinqService,False,True,True).sql @@ -20,3 +20,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +CREATE TABLE [TestDataMS].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..0b055aea9ec3 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,35 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[TestTable]', N'U') IS NOT NULL) + DROP TABLE [TestTable] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2012.MS.LinqService).sql index b0ed83c6c7e1..7758cfeb6904 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2012.MS.LinqService).sql @@ -1,4 +1,31 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 SELECT @@ -7,3 +34,9 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..4be0de140eb9 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.MS.LinqService,100).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.MS.LinqService,100).sql index c7a8e3cf85c7..0290f55f4787 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.MS.LinqService,100).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.MS.LinqService,100).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.MS.LinqService,200).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.MS.LinqService,200).sql index c7a8e3cf85c7..0290f55f4787 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.MS.LinqService,200).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2012.MS.LinqService,200).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,100).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,100).sql index ad9c083ebc2e..fbb2c4c10a60 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,100).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,200).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,200).sql index ad9c083ebc2e..fbb2c4c10a60 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,200).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.MS.LinqService,100).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.MS.LinqService,100).sql index c7a8e3cf85c7..db986884a712 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.MS.LinqService,100).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.MS.LinqService,200).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.MS.LinqService,200).sql index c7a8e3cf85c7..da7f21884e46 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.MS.LinqService,200).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2012.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,100).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,100).sql index ad9c083ebc2e..b20506b78484 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,100).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,200).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,200).sql index ad9c083ebc2e..5e9842c5272e 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,200).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.MS.LinqService,100).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.MS.LinqService,100).sql index 11686d58f195..0acb7db339f7 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.MS.LinqService,100).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.MS.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.MS.LinqService,200).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.MS.LinqService,200).sql index 11686d58f195..67d50e001789 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.MS.LinqService,200).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2012.MS.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.MS.LinqService,100).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.MS.LinqService,100).sql index c7a8e3cf85c7..e892d2c86477 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.MS.LinqService,100).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.MS.LinqService,200).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.MS.LinqService,200).sql index c7a8e3cf85c7..e892d2c86477 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.MS.LinqService,200).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2012.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,100).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,100).sql index ad9c083ebc2e..3fa35dec8cb1 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,100).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,200).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,200).sql index ad9c083ebc2e..3fa35dec8cb1 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,200).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2012.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..d251c19d567e --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..6e173e6efd23 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..6e173e6efd23 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2012.MS.LinqService).sql index ef279067f226..5bdfeb6f30f4 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2012.MS.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,33 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2012.MS.LinqService).sql index d29d0093a9be..af91d4f4b88d 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2012.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..a08b1b8bc360 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,151 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2012.MS.LinqService).sql index d29d0093a9be..61adcbf7d77f 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2012.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2012.MS.LinqService).sql index d29d0093a9be..cb5c60528366 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2012.MS.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2012.MS.LinqService).sql index 736fb059e087..ae79bd604088 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2012.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2012.MS.LinqService).sql index 736fb059e087..ae79bd604088 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2012.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2012.MS.LinqService).sql index b4cb87f6f52d..960d3e52fe49 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2012.MS.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,1).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,1).sql index 33d83b45facb..ff9cf9311ea7 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,1).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,2).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,2).sql index 33d83b45facb..caa267682259 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,2).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,1).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,1).sql index 33d83b45facb..f93367acca0c 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,1).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,2).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,2).sql index 33d83b45facb..063c2a1acd74 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,2).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.MS.LinqService,100).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.MS.LinqService,100).sql index 8027240fe308..40164c5dfba9 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.MS.LinqService,100).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.MS.LinqService,200).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.MS.LinqService,200).sql index 921810ba6f70..120751b91d35 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.MS.LinqService,200).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2012.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.MS.LinqService,100).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.MS.LinqService,100).sql index add63ab38eab..0e3aea5a3359 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.MS.LinqService,100).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.MS.LinqService,200).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.MS.LinqService,200).sql index a62cbd846df2..2b3069e28aaa 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.MS.LinqService,200).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2012.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,1).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,1).sql index 33d83b45facb..87c8de3076da 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,1).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,2).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,2).sql index 33d83b45facb..89397209050b 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,2).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2012.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,1).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,1).sql index 33d83b45facb..f93367acca0c 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,1).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,2).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,2).sql index 33d83b45facb..063c2a1acd74 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,2).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2012.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2012.MS.LinqService).sql index 2facc0de843c..de12190dd8eb 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2012.MS.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2012.MS.LinqService).sql index 2facc0de843c..ec4f463eca98 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2012.MS.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2012.MS.LinqService).sql index f191c6f14f82..c4de1e072d0b 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2012.MS.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2012.MS.LinqService).sql index f191c6f14f82..1d85ff4a2f15 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2012.MS.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2012.MS SqlServer.2012 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..889c042ffa8c --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..4ce7edc52128 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..4ce7edc52128 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..f81254bcbff6 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..e3bcae791b78 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..e3bcae791b78 --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2012.MS.LinqService).sql new file mode 100644 index 000000000000..6bac3494a38a --- /dev/null +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2012.MS.LinqService).sql @@ -0,0 +1,106 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2012.MS.LinqService).sql index e970a5496e05..ae0dcc471cf1 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2012.MS.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql index f2317e4f099b..9eb6ac37bd3e 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 SELECT diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..0cb7e9c6649d 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..de8a633fbd8f 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql index f117a2d5d53c..31b87bdd3cdd 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 SELECT diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..48a029b32cb9 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..128c1e5823f3 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..622f40b8b92e 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..09ffc64f0afc 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..ff7f22e73632 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..4bbec0953aae 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql index f2317e4f099b..9eb6ac37bd3e 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 SELECT diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..0cb7e9c6649d 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..de8a633fbd8f 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql index f117a2d5d53c..31b87bdd3cdd 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 SELECT diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..48a029b32cb9 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..128c1e5823f3 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..622f40b8b92e 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..09ffc64f0afc 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..ff7f22e73632 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql index 4e90e465a4a2..4bbec0953aae 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2012.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql index 5f160351c963..d4fffe46d3fc 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 SELECT diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql index 0fd17cb91ff7..f3481935dac1 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql index 0fd17cb91ff7..9a50024f7970 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql index 0fd17cb91ff7..652375fc9056 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql index 0fd17cb91ff7..167c1fcf7fb4 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql index 0fd17cb91ff7..6a55ec729354 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.MS.LinqService).sql index 0fd17cb91ff7..cfac0518c973 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.MS.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2012.MS.LinqService).sql index 5f160351c963..f80758068ce5 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2012.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 SELECT diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql index 5f160351c963..8f7f2cb10963 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 SELECT diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql index 0fd17cb91ff7..31952465c68c 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql index 0fd17cb91ff7..0232b4264344 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql index 0fd17cb91ff7..9821615c74d7 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2012.MS.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql index 0fd17cb91ff7..86046cef9c02 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2012.MS.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql index 0fd17cb91ff7..0e57505f0f58 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2012.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.MS.LinqService).sql index 0fd17cb91ff7..1a5704a23977 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2012.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2012.MS SqlServer.2012 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2012.MS.LinqService).sql b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2012.MS.LinqService).sql index 5f160351c963..1430a9ad129d 100644 --- a/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2012.MS.LinqService).sql +++ b/SqlServer.2012.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2012.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2012.MS SqlServer.2012 SELECT diff --git a/SqlServer.2012.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2012.MS).sql b/SqlServer.2012.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2012.MS).sql new file mode 100644 index 000000000000..7055dffa9e8a --- /dev/null +++ b/SqlServer.2012.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2012.MS).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2012.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2012.MS).sql b/SqlServer.2012.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2012.MS).sql new file mode 100644 index 000000000000..37987a6b588f --- /dev/null +++ b/SqlServer.2012.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2012.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2012.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2012.MS).sql b/SqlServer.2012.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2012.MS).sql new file mode 100644 index 000000000000..37987a6b588f --- /dev/null +++ b/SqlServer.2012.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2012.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2012.MS SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2012/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2012).sql b/SqlServer.2012/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2012).sql new file mode 100644 index 000000000000..d3327ae20419 --- /dev/null +++ b/SqlServer.2012/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2012).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2012/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2012).sql b/SqlServer.2012/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2012).sql new file mode 100644 index 000000000000..1f0053160afb --- /dev/null +++ b/SqlServer.2012/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2012).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2012/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2012).sql b/SqlServer.2012/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2012).sql new file mode 100644 index 000000000000..1f0053160afb --- /dev/null +++ b/SqlServer.2012/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2012).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2012 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From 4720778b0881c2812826fa2b7953613161eea473 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:29:35 +0000 Subject: [PATCH 05/40] [Linux / Firebird 2.5] baselines --- ...ts.All4Async(Firebird.2.5.LinqService).sql | 18 + ...roupBy2Async(Firebird.2.5.LinqService).sql | 30 + ...merable1Test(Firebird.2.5.LinqService).sql | 9 + ...merable2Test(Firebird.2.5.LinqService).sql | 11 + ...bleCast1Test(Firebird.2.5.LinqService).sql | 9 + ...bleCast2Test(Firebird.2.5.LinqService).sql | 11 + ...insAsyncTest(Firebird.2.5.LinqService).sql | 20 + ...rstAsyncTest(Firebird.2.5.LinqService).sql | 14 + ...TakeSkipTest(Firebird.2.5.LinqService).sql | 15 + ...rstOrDefault(Firebird.2.5.LinqService).sql | 19 + ...kupAsyncTest(Firebird.2.5.LinqService).sql | 21 + ...entAsyncTest(Firebird.2.5.LinqService).sql | 21 + ...AnyTestAsync(Firebird.2.5.LinqService).sql | 40 ++ ...nyTestAsync2(Firebird.2.5.LinqService).sql | 40 ++ ...hoAsyncdTest(Firebird.2.5.LinqService).sql | 15 + ...edTest3Async(Firebird.2.5.LinqService).sql | 26 + ...insTestAsync(Firebird.2.5.LinqService).sql | 40 ++ ...untTestAsync(Firebird.2.5.LinqService).sql | 24 + ...ntTestAsync2(Firebird.2.5.LinqService).sql | 24 + ...ntTestAsync1(Firebird.2.5.LinqService).sql | 26 + ...ntTestAsync2(Firebird.2.5.LinqService).sql | 26 + ...MaxTestAsync(Firebird.2.5.LinqService).sql | 24 + ...axTestAsync2(Firebird.2.5.LinqService).sql | 24 + ...edicateAsync(Firebird.2.5.LinqService).sql | 187 +------ ...edicateAsync(Firebird.2.5.LinqService).sql | 179 +----- ...edicateAsync(Firebird.2.5.LinqService).sql | 180 +----- ...edicateAsync(Firebird.2.5.LinqService).sql | 180 +----- ...edicateAsync(Firebird.2.5.LinqService).sql | 179 +----- ...electorAsync(Firebird.2.5.LinqService).sql | 179 +----- ...electorAsync(Firebird.2.5.LinqService).sql | 179 +----- ...edicateAsync(Firebird.2.5.LinqService).sql | 180 +----- ...edicateAsync(Firebird.2.5.LinqService).sql | 180 +----- ...Concat1Async(Firebird.2.5.LinqService).sql | 19 + ...crementAsync(Firebird.2.5.LinqService).sql | 97 ++++ ...ilteredAsync(Firebird.2.5.LinqService).sql | 80 +++ ....Count1Async(Firebird.2.5.LinqService).sql | 8 + ....Count2Async(Firebird.2.5.LinqService).sql | 10 + ...eryMax1Async(Firebird.2.5.LinqService).sql | 16 + ...ts.Issue4602(Firebird.2.5.LinqService).sql | 110 +--- ...ue4057_Async(Firebird.2.5.LinqService).sql | 29 + ...tTransaction(Firebird.2.5.LinqService).sql | 29 + ...ressionAsync(Firebird.2.5.LinqService).sql | 25 + ...s.Cast1Async(Firebird.2.5.LinqService).sql | 11 + ....Test18Async(Firebird.2.5.LinqService).sql | 14 + ...ameter1Async(Firebird.2.5.LinqService).sql | 7 + ...ssue3132Test(Firebird.2.5.LinqService).sql | 213 ++++++++ ...2Async(Firebird.2.5.LinqService,False).sql | 15 + ...t2Async(Firebird.2.5.LinqService,True).sql | 15 + ...3Async(Firebird.2.5.LinqService,False).sql | 15 + ...t3Async(Firebird.2.5.LinqService,True).sql | 15 + ...leSkip1Async(Firebird.2.5.LinqService).sql | 93 +--- ...1Async(Firebird.2.5.LinqService,False).sql | 18 + ...e1Async(Firebird.2.5.LinqService,True).sql | 22 + ...2Async(Firebird.2.5.LinqService,False).sql | 11 + ...e2Async(Firebird.2.5.LinqService,True).sql | 11 + ...3Async(Firebird.2.5.LinqService,False).sql | 11 + ...e3Async(Firebird.2.5.LinqService,True).sql | 13 + ...4Async(Firebird.2.5.LinqService,False).sql | 11 + ...e4Async(Firebird.2.5.LinqService,True).sql | 13 + ...5Async(Firebird.2.5.LinqService,False).sql | 9 + ...e5Async(Firebird.2.5.LinqService,True).sql | 11 + ...ird.2.5.LinqService,False,False,False).sql | 19 + ...bird.2.5.LinqService,False,False,True).sql | 19 + ...bird.2.5.LinqService,False,True,False).sql | 19 + ...ebird.2.5.LinqService,False,True,True).sql | 19 + ...bird.2.5.LinqService,True,False,False).sql | 19 + ...ebird.2.5.LinqService,True,False,True).sql | 19 + ...ebird.2.5.LinqService,True,True,False).sql | 19 + ...rebird.2.5.LinqService,True,True,True).sql | 19 + ...eTable1Async(Firebird.2.5.LinqService).sql | 59 ++ ...teTableAsync(Firebird.2.5.LinqService).sql | 41 ++ ...bleNameAsync(Firebird.2.5.LinqService).sql | 113 ++++ ...leRecord(Firebird.2.5.LinqService,100).sql | 12 + ...leRecord(Firebird.2.5.LinqService,200).sql | 12 + ...leRecord(Firebird.2.5.LinqService,100).sql | 14 + ...leRecord(Firebird.2.5.LinqService,200).sql | 14 + ...leRecord(Firebird.2.5.LinqService,100).sql | 11 + ...leRecord(Firebird.2.5.LinqService,200).sql | 11 + ...Insert2Async(Firebird.2.5.LinqService).sql | 44 ++ ...Insert3Async(Firebird.2.5.LinqService).sql | 46 ++ ...Insert4Async(Firebird.2.5.LinqService).sql | 46 ++ ...bleNameAsync(Firebird.2.5.LinqService).sql | 94 ++++ ...eplace1Async(Firebird.2.5.LinqService).sql | 97 ++++ ...bleNameAsync(Firebird.2.5.LinqService).sql | 155 ++++++ ...Update3Async(Firebird.2.5.LinqService).sql | 97 ++++ ...pdate3xAsync(Firebird.2.5.LinqService).sql | 103 ++++ ...entity1Async(Firebird.2.5.LinqService).sql | 14 + ...entity2Async(Firebird.2.5.LinqService).sql | 14 + ...entity4Async(Firebird.2.5.LinqService).sql | 32 ++ ...jAsyncTest(Firebird.2.5.LinqService,1).sql | 51 +- ...jAsyncTest(Firebird.2.5.LinqService,2).sql | 51 +- ...rAsyncTest(Firebird.2.5.LinqService,1).sql | 51 +- ...rAsyncTest(Firebird.2.5.LinqService,2).sql | 51 +- ...leRecord(Firebird.2.5.LinqService,100).sql | 24 + ...leRecord(Firebird.2.5.LinqService,200).sql | 24 + ...jAsyncTest(Firebird.2.5.LinqService,1).sql | 51 +- ...jAsyncTest(Firebird.2.5.LinqService,2).sql | 51 +- ...rAsyncTest(Firebird.2.5.LinqService,1).sql | 51 +- ...rAsyncTest(Firebird.2.5.LinqService,2).sql | 51 +- ...romQueryAsyn(Firebird.2.5.LinqService).sql | 39 ++ ...romTableAsyn(Firebird.2.5.LinqService).sql | 37 ++ ...pdate12Async(Firebird.2.5.LinqService).sql | 28 + ...Update1Async(Firebird.2.5.LinqService).sql | 54 ++ ...Update2Async(Firebird.2.5.LinqService).sql | 54 ++ ...Update4Async(Firebird.2.5.LinqService).sql | 63 +++ ...iation1Async(Firebird.2.5.LinqService).sql | 47 ++ ...ion1AsyncOld(Firebird.2.5.LinqService).sql | 47 ++ ...bleNameAsync(Firebird.2.5.LinqService).sql | 130 +++++ ...omplex1Async(Firebird.2.5.LinqService).sql | 55 ++ ...SingleRecord(Firebird.2.5.LinqService).sql | 517 +++--------------- ...SingleRecord(Firebird.2.5.LinqService).sql | 513 ++--------------- ...SingleRecord(Firebird.2.5.LinqService).sql | 512 ++--------------- ...SingleRecord(Firebird.2.5.LinqService).sql | 517 +++--------------- ...SingleRecord(Firebird.2.5.LinqService).sql | 513 ++--------------- ...SingleRecord(Firebird.2.5.LinqService).sql | 512 ++--------------- ...SingleRecord(Firebird.2.5.LinqService).sql | 243 +------- ...SingleRecord(Firebird.2.5.LinqService).sql | 239 +------- ...SingleRecord(Firebird.2.5.LinqService).sql | 238 +------- ...SingleRecord(Firebird.2.5.LinqService).sql | 244 +-------- ...SingleRecord(Firebird.2.5.LinqService).sql | 240 +------- ...SingleRecord(Firebird.2.5.LinqService).sql | 239 +------- ...sts.Linq.AsyncTests.Test(Firebird.2.5).sql | 18 + ...ts.Linq.AsyncTests.Test1(Firebird.2.5).sql | 9 + ...q.AsyncTests.TestForEach(Firebird.2.5).sql | 9 + 124 files changed, 3808 insertions(+), 6027 deletions(-) create mode 100644 Firebird.2.5.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.2.5.LinqService,False).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.2.5.LinqService,True).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.2.5.LinqService,False).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.2.5.LinqService,True).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.2.5.LinqService,False).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.2.5.LinqService,True).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.2.5.LinqService,False).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.2.5.LinqService,True).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.2.5.LinqService,False).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.2.5.LinqService,True).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.2.5.LinqService,False).sql create mode 100644 Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.2.5.LinqService,True).sql create mode 100644 Firebird.2.5.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.2.5.LinqService).sql create mode 100644 Firebird.2.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.2.5).sql create mode 100644 Firebird.2.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.2.5).sql create mode 100644 Firebird.2.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.2.5).sql diff --git a/Firebird.2.5.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..b1ca4ef07778 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" <= 3 + ) + THEN '1' + ELSE '0' + END +FROM rdb$database + diff --git a/Firebird.2.5.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..02cd965f25a6 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT DISTINCT + "a_Parent1"."ParentID" + FROM + "Child" "t1" + INNER JOIN "Parent" "a_Parent1" ON "t1"."ParentID" = "a_Parent1"."ParentID" + ) "m_1" + INNER JOIN "Child" "d" + INNER JOIN "Parent" "a_Parent1_1" ON "d"."ParentID" = "a_Parent1_1"."ParentID" + ON "m_1"."ParentID" = "a_Parent1_1"."ParentID" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "a_Parent1"."ParentID" +FROM + "Child" "t1" + INNER JOIN "Parent" "a_Parent1" ON "t1"."ParentID" = "a_Parent1"."ParentID" +GROUP BY + "a_Parent1"."ParentID" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..5ba39213f3fa --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.2.5.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..421f8b501112 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.2.5.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" > 1 + diff --git a/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..5ba39213f3fa --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.2.5.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..421f8b501112 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.2.5.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" > 1 + diff --git a/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..0604a4ddd745 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.2.5.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Person" "t1" + WHERE + CAST(@ID AS Int) = "t1"."PersonID" + ) + THEN '1' + ELSE '0' + END +FROM rdb$database + diff --git a/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..faa15a512e83 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.2.5.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT FIRST 1 + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."PersonID" = 1 + diff --git a/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.2.5.LinqService).sql index 10301991996f..e7a0d4e96d8a 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.2.5.LinqService).sql @@ -13,3 +13,18 @@ FROM ORDER BY "t1"."ParentID" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 +DECLARE @skip Integer -- Int32 +SET @skip = 1 + +SELECT FIRST @take SKIP @skip + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" +ORDER BY + "t1"."ParentID" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..f1de4a39890d --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.2.5.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer -- Int32 +SET @p_2 = 3 +DECLARE @param Integer -- Int32 +SET @param = 4 + +SELECT FIRST 1 + "o"."ParentID", + "o"."Value1" +FROM + "Parent" "o" +WHERE + "o"."ParentID" IN (@p, @p_1, @p_2) OR "o"."ParentID" = @param + diff --git a/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..cb06672ec633 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.2.5.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +ORDER BY + "t1"."ParentID", + "t1"."ChildID" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..cb06672ec633 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.2.5.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +ORDER BY + "t1"."ParentID", + "t1"."ChildID" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..9cba5cee5761 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.2.5.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) + THEN '1' + ELSE '0' + END +FROM rdb$database + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) + THEN '1' + ELSE '0' + END +FROM rdb$database + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..9cba5cee5761 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.2.5.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) + THEN '1' + ELSE '0' + END +FROM rdb$database + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) + THEN '1' + ELSE '0' + END +FROM rdb$database + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..f696f98d7e35 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.2.5.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT FIRST 1 + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = @p +ORDER BY + "x"."ParentID" DESC + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..87f19966f630 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT FIRST @p + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT FIRST @p + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..ab744229820c --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.2.5.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + CAST(@p AS Int) = "c_1"."ParentID" + ) + THEN '1' + ELSE '0' + END +FROM rdb$database + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + CAST(@p AS Int) = "c_1"."ParentID" + ) + THEN '1' + ELSE '0' + END +FROM rdb$database + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..761c1d71d504 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.2.5.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..761c1d71d504 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.2.5.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..df400b965624 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.2.5.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT FIRST 1 + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT FIRST 1 + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..df400b965624 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.2.5.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT FIRST 1 + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT FIRST 1 + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..fdc811f101d0 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.2.5.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..fdc811f101d0 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.2.5.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.2.5.LinqService).sql index e911c69d6e6e..3f1208cb39c4 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.2.5.LinqService).sql @@ -1,171 +1,20 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "AsyncDataTable" "c_1" + WHERE + "c_1"."Id" = @p + ) + THEN '1' + ELSE '0' + END +FROM rdb$database diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.2.5.LinqService).sql index e911c69d6e6e..c086a30896fb 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.2.5.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = @p diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.2.5.LinqService).sql index e911c69d6e6e..b45a64b187f6 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.2.5.LinqService).sql @@ -1,171 +1,13 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT FIRST 1 + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.2.5.LinqService).sql index e911c69d6e6e..b45a64b187f6 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.2.5.LinqService).sql @@ -1,171 +1,13 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT FIRST 1 + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.2.5.LinqService).sql index e911c69d6e6e..c086a30896fb 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.2.5.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = @p diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.2.5.LinqService).sql index e911c69d6e6e..293d6692a980 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.2.5.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MAX("c_1"."Id") +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" > @p diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.2.5.LinqService).sql index e911c69d6e6e..560457f37e02 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.2.5.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MIN("c_1"."Id") +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" > @p diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.2.5.LinqService).sql index e911c69d6e6e..d6ad03c212a2 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.2.5.LinqService).sql @@ -1,171 +1,13 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT FIRST 2 + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) diff --git a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.2.5.LinqService).sql index e911c69d6e6e..d6ad03c212a2 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.2.5.LinqService).sql @@ -1,171 +1,13 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT FIRST 2 + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) diff --git a/Firebird.2.5.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..8b230e43ef1c --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" = 1 +UNION ALL +SELECT + "p_1"."ParentID", + "p_1"."Value1" +FROM + "Parent" "p_1" +WHERE + "p_1"."ParentID" = 2 + diff --git a/Firebird.2.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.2.5.LinqService).sql index 982336baafc5..5274624346c3 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.2.5.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Firebird.2.5 Firebird SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.2.5 Firebird @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.2.5 Firebird @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.2.5 Firebird @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" "obj" +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.2.5 Firebird @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" "obj" +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.2.5 Firebird diff --git a/Firebird.2.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.2.5.LinqService).sql index 6c2945181166..85118379f64d 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.2.5.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Firebird.2.5 Firebird SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" "r" +SET + "Stamp" = "r"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "r"."Id" = 2 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.2.5 Firebird @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" "r" +SET + "Stamp" = "r"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "r"."Id" = 1 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.2.5 Firebird @@ -28,6 +84,18 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" "r" +WHERE + "r"."Id" = 2 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.2.5 Firebird @@ -38,6 +106,18 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" "r" +WHERE + "r"."Id" = 1 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.2.5 Firebird diff --git a/Firebird.2.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..b8f5abc84eb3 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" "t1" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..8756b0377e1c --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 2 + diff --git a/Firebird.2.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..e3eddfddc65a --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" "c_1" + LEFT JOIN "Parent" "a_Parent" ON "c_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "a_Parent"."ParentID" = "t1"."ParentID" + )) +FROM + "Parent" "t1" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.2.5.LinqService).sql index d2439209c940..17edd54f2f09 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.2.5.LinqService).sql @@ -1,103 +1,11 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicParent"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicParent')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DynamicParent" - ( - ID Int NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY (ID) - ) - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT ' - CREATE GENERATOR "GIDENTITY_DynamicParent" - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT ' - CREATE TRIGGER "TIDENTITY_DynamicParent" FOR "DynamicParent" - BEFORE INSERT POSITION 0 - AS BEGIN - NEW.ID = GEN_ID("GIDENTITY_DynamicParent", 1); - END - '; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicChild"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicChild')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DynamicChild" - ( - ID Int NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY (ID) - ) - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT ' - CREATE GENERATOR "GIDENTITY_DynamicChild" - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT ' - CREATE TRIGGER "TIDENTITY_DynamicChild" FOR "DynamicChild" - BEFORE INSERT POSITION 0 - AS BEGIN - NEW.ID = GEN_ID("GIDENTITY_DynamicChild", 1); - END - '; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicChild"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicParent"'; -END +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "it".ID +FROM + "DynamicParent" "it" + LEFT JOIN "DynamicChild" "a_Child" ON "it".ID = "a_Child"."ParentID" +WHERE + "a_Child".ID = 123 diff --git a/Firebird.2.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.2.5.LinqService).sql index b30731872915..fcf75096fb6d 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.2.5.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT FIRST 1 + "x"."ParentID" + FROM + "Parent" "x" + WHERE + "x"."ParentID" = 3 + ) "m_1" + INNER JOIN "Child" "d" ON "m_1"."ParentID" = "d"."ParentID" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT FIRST 1 + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- Firebird.2.5 Firebird (asynchronously) diff --git a/Firebird.2.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.2.5.LinqService).sql index 6abd28f170a0..40a48098d27c 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.2.5.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT FIRST 1 + "x"."ParentID" + FROM + "Parent" "x" + WHERE + "x"."ParentID" = 3 + ) "m_1" + INNER JOIN "Child" "d" ON "m_1"."ParentID" = "d"."ParentID" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT FIRST 1 + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = 3 + +BeforeExecute BeginTransaction BeforeExecute -- Firebird.2.5 Firebird (asynchronously) diff --git a/Firebird.2.5.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..8584a141c5f4 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.2.5.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" "a_Children" + INNER JOIN "GrandChild" "a_GrandChildren" ON "a_Children"."ParentID" = "a_GrandChildren"."ParentID" AND "a_Children"."ChildID" = "a_GrandChildren"."ChildID" + WHERE + "p"."ParentID" = "a_Children"."ParentID" + ) +FROM + "Parent" "p" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..c103b707c2a8 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" +WHERE + "t1"."Value1" = 1 + diff --git a/Firebird.2.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..f425831cdb6b --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT DISTINCT + "p1"."PersonID", + "p1"."Gender", + "p1"."FirstName", + "p1"."LastName" +FROM + "Person" "p1" +WHERE + "p1"."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + "p1"."Gender" = 'F' + diff --git a/Firebird.2.5.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..4e9098b5bb33 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,7 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + 1 +FROM rdb$database + diff --git a/Firebird.2.5.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..425e4d7f6837 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.2.5.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "x"."MiddleName", + COUNT(*) +FROM + "Person" "x" +WHERE + "x"."MiddleName" IS NOT NULL +GROUP BY + "x"."MiddleName" +UNION ALL +SELECT + "x_1"."MiddleName", + COUNT(*) +FROM + "Person" "x_1" +WHERE + "x_1"."MiddleName" IS NOT NULL +GROUP BY + "x_1"."MiddleName" +UNION ALL +SELECT + "x_2"."MiddleName", + COUNT(*) +FROM + "Person" "x_2" +WHERE + "x_2"."MiddleName" IS NOT NULL +GROUP BY + "x_2"."MiddleName" +UNION ALL +SELECT + "x_3"."MiddleName", + COUNT(*) +FROM + "Person" "x_3" +WHERE + "x_3"."MiddleName" IS NOT NULL +GROUP BY + "x_3"."MiddleName" +UNION ALL +SELECT + "x_4"."MiddleName", + COUNT(*) +FROM + "Person" "x_4" +WHERE + "x_4"."MiddleName" IS NOT NULL +GROUP BY + "x_4"."MiddleName" +UNION ALL +SELECT + "x_5"."MiddleName", + COUNT(*) +FROM + "Person" "x_5" +WHERE + "x_5"."MiddleName" IS NOT NULL +GROUP BY + "x_5"."MiddleName" +UNION ALL +SELECT + "x_6"."MiddleName", + COUNT(*) +FROM + "Person" "x_6" +WHERE + "x_6"."MiddleName" IS NOT NULL +GROUP BY + "x_6"."MiddleName" +UNION ALL +SELECT + "x_7"."MiddleName", + COUNT(*) +FROM + "Person" "x_7" +WHERE + "x_7"."MiddleName" IS NOT NULL +GROUP BY + "x_7"."MiddleName" +UNION ALL +SELECT + "x_8"."MiddleName", + COUNT(*) +FROM + "Person" "x_8" +WHERE + "x_8"."MiddleName" IS NOT NULL +GROUP BY + "x_8"."MiddleName" +UNION ALL +SELECT + "x_9"."MiddleName", + COUNT(*) +FROM + "Person" "x_9" +WHERE + "x_9"."MiddleName" IS NOT NULL +GROUP BY + "x_9"."MiddleName" +UNION ALL +SELECT + "x_10"."MiddleName", + COUNT(*) +FROM + "Person" "x_10" +WHERE + "x_10"."MiddleName" IS NOT NULL +GROUP BY + "x_10"."MiddleName" +UNION ALL +SELECT + "x_11"."MiddleName", + COUNT(*) +FROM + "Person" "x_11" +WHERE + "x_11"."MiddleName" IS NOT NULL +GROUP BY + "x_11"."MiddleName" +UNION ALL +SELECT + "x_12"."MiddleName", + COUNT(*) +FROM + "Person" "x_12" +WHERE + "x_12"."MiddleName" IS NOT NULL +GROUP BY + "x_12"."MiddleName" +UNION ALL +SELECT + "x_13"."MiddleName", + COUNT(*) +FROM + "Person" "x_13" +WHERE + "x_13"."MiddleName" IS NOT NULL +GROUP BY + "x_13"."MiddleName" +UNION ALL +SELECT + "x_14"."MiddleName", + COUNT(*) +FROM + "Person" "x_14" +WHERE + "x_14"."MiddleName" IS NOT NULL +GROUP BY + "x_14"."MiddleName" +UNION ALL +SELECT + "x_15"."MiddleName", + COUNT(*) +FROM + "Person" "x_15" +WHERE + "x_15"."MiddleName" IS NOT NULL +GROUP BY + "x_15"."MiddleName" +UNION ALL +SELECT + "x_16"."MiddleName", + COUNT(*) +FROM + "Person" "x_16" +WHERE + "x_16"."MiddleName" IS NOT NULL +GROUP BY + "x_16"."MiddleName" +UNION ALL +SELECT + "x_17"."MiddleName", + COUNT(*) +FROM + "Person" "x_17" +WHERE + "x_17"."MiddleName" IS NOT NULL +GROUP BY + "x_17"."MiddleName" +UNION ALL +SELECT + "x_18"."MiddleName", + COUNT(*) +FROM + "Person" "x_18" +WHERE + "x_18"."MiddleName" IS NOT NULL +GROUP BY + "x_18"."MiddleName" +UNION ALL +SELECT + "x_19"."MiddleName", + COUNT(*) +FROM + "Person" "x_19" +WHERE + "x_19"."MiddleName" IS NOT NULL +GROUP BY + "x_19"."MiddleName" +UNION ALL +SELECT + "x_20"."MiddleName", + COUNT(*) +FROM + "Person" "x_20" +WHERE + "x_20"."MiddleName" IS NOT NULL +GROUP BY + "x_20"."MiddleName" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.2.5.LinqService,False).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.2.5.LinqService,False).sql new file mode 100644 index 000000000000..c3544f8f825c --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.2.5.LinqService,False).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT FIRST 1 SKIP @n + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.2.5.LinqService,True).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.2.5.LinqService,True).sql new file mode 100644 index 000000000000..c3544f8f825c --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.2.5.LinqService,True).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT FIRST 1 SKIP @n + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.2.5.LinqService,False).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.2.5.LinqService,False).sql new file mode 100644 index 000000000000..c3544f8f825c --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.2.5.LinqService,False).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT FIRST 1 SKIP @n + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.2.5.LinqService,True).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.2.5.LinqService,True).sql new file mode 100644 index 000000000000..c3544f8f825c --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.2.5.LinqService,True).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT FIRST 1 SKIP @n + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.2.5.LinqService).sql index 5531348e45b6..167c563a4266 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.2.5.LinqService).sql @@ -1,85 +1,12 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TakeSkipClass')) THEN - EXECUTE STATEMENT 'DROP TABLE "TakeSkipClass"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TakeSkipClass')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TakeSkipClass" - ( - "Value" VarChar(10) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Value VarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Value VarChar(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Value VarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Value VarChar(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TakeSkipClass')) THEN - EXECUTE STATEMENT 'DROP TABLE "TakeSkipClass"'; -END +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @skip Integer -- Int32 +SET @skip = 3 + +SELECT SKIP @skip + "t1"."Value" +FROM + "TakeSkipClass" "t1" +ORDER BY + "t1"."Value" diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.2.5.LinqService,False).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.2.5.LinqService,False).sql index fe438e76cfc9..85d49e74e633 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.2.5.LinqService,False).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.2.5.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT FIRST 3 FROM "Child" "ch" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT FIRST 2 + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT FIRST 3 + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.2.5.LinqService,True).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.2.5.LinqService,True).sql index 7b649f03f04a..34c77f0d7a13 100644 --- a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.2.5.LinqService,True).sql +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.2.5.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT FIRST @take FROM "Child" "ch" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 + +SELECT FIRST @take + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT FIRST @take + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.2.5.LinqService,False).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.2.5.LinqService,False).sql new file mode 100644 index 000000000000..e5b99ac8a9eb --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.2.5.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT FIRST @n + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.2.5.LinqService,True).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.2.5.LinqService,True).sql new file mode 100644 index 000000000000..e5b99ac8a9eb --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.2.5.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT FIRST @n + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.2.5.LinqService,False).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.2.5.LinqService,False).sql new file mode 100644 index 000000000000..3801f202bcfd --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.2.5.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT FIRST 3 + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" > 3 OR "ch"."ChildID" < 4 + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.2.5.LinqService,True).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.2.5.LinqService,True).sql new file mode 100644 index 000000000000..03418f3f9b99 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.2.5.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT FIRST @take + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" > 3 OR "ch"."ChildID" < 4 + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.2.5.LinqService,False).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.2.5.LinqService,False).sql new file mode 100644 index 000000000000..8ed056d2987e --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.2.5.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT FIRST 3 + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" >= 0 AND "ch"."ChildID" <= 100 + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.2.5.LinqService,True).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.2.5.LinqService,True).sql new file mode 100644 index 000000000000..aa2cceab616d --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.2.5.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT FIRST @take + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" >= 0 AND "ch"."ChildID" <= 100 + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.2.5.LinqService,False).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.2.5.LinqService,False).sql new file mode 100644 index 000000000000..06d00197362a --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.2.5.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT FIRST 3 + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.2.5.LinqService,True).sql b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.2.5.LinqService,True).sql new file mode 100644 index 000000000000..0a90f42444c0 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.2.5.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT FIRST @take + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,False,False).sql b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,False,False).sql index 6c22b5c9efd4..0eaa09892af4 100644 --- a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,False,False).sql +++ b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,False,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,False,True).sql b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,False,True).sql index 6c22b5c9efd4..0eaa09892af4 100644 --- a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,False,True).sql +++ b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,False,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,True,False).sql b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,True,False).sql index 6c22b5c9efd4..0eaa09892af4 100644 --- a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,True,False).sql +++ b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,True,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,True,True).sql b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,True,True).sql index 6c22b5c9efd4..0eaa09892af4 100644 --- a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,True,True).sql +++ b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,False,True,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,False,False).sql b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,False,False).sql index 6c22b5c9efd4..0eaa09892af4 100644 --- a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,False,False).sql +++ b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,False,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,False,True).sql b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,False,True).sql index 6c22b5c9efd4..0eaa09892af4 100644 --- a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,False,True).sql +++ b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,False,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,True,False).sql b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,True,False).sql index 6c22b5c9efd4..0eaa09892af4 100644 --- a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,True,False).sql +++ b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,True,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,True,True).sql b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,True,True).sql index 6c22b5c9efd4..0eaa09892af4 100644 --- a/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,True,True).sql +++ b/Firebird.2.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.2.5.LinqService,True,True,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..e9068a7d746a --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,59 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_TestTable')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_TestTable"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_TestTable')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_TestTable"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TestTable')) THEN + EXECUTE STATEMENT 'DROP TABLE "TestTable"'; +END + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "TestTable" + ( + ID Int NOT NULL, + "Field1" VarChar(50) CHARACTER SET UNICODE_FSS, + "Field2" VarChar(255) CHARACTER SET UNICODE_FSS, + "CreatedOn" TimeStamp, + + CONSTRAINT "PK_TestTable" PRIMARY KEY (ID) + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_TestTable" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_TestTable" FOR "TestTable" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW.ID = GEN_ID("GIDENTITY_TestTable", 1); + END + '; +END + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "t1".ID, + "t1"."Field1", + "t1"."Field2", + "t1"."CreatedOn" +FROM + "TestTable" "t1" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_TestTable"'; + EXECUTE STATEMENT 'DROP TABLE "TestTable"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.2.5.LinqService).sql index f30db2f8e2c1..1617c14318a5 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.2.5.LinqService).sql @@ -1,4 +1,37 @@ BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TempTable')) THEN + EXECUTE STATEMENT 'DROP TABLE "TempTable"'; +END + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TempTable')) THEN + EXECUTE STATEMENT ' + CREATE TABLE "TempTable" + ( + ID Int NOT NULL + ) + '; +END + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +INSERT INTO "TempTable" +( + ID +) +SELECT + "p"."ParentID" +FROM + "Parent" "p" + +BeforeExecute -- Firebird.2.5 Firebird SELECT @@ -7,3 +40,11 @@ FROM "Parent" "p" INNER JOIN "TempTable" "t" ON "p"."ParentID" = "t".ID +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TempTable')) THEN + EXECUTE STATEMENT 'DROP TABLE "TempTable"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..af8b2333c59e --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.2.5.LinqService).sql @@ -0,0 +1,113 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_xxPerson_fl_30')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_30"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_xxPerson_fl_30')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_30"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPerson_fl_30')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_30"'; +END + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "xxPerson_fl_30" + ( + "FirstName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "MiddleName" VarChar(255) CHARACTER SET UNICODE_FSS, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_fl_30" PRIMARY KEY ("PersonID") + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_xxPerson_fl_30" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_xxPerson_fl_30" FOR "xxPerson_fl_30" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW."PersonID" = GEN_ID("GIDENTITY_xxPerson_fl_30", 1); + END + '; +END + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson_fl_30" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_30" "t1" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT FIRST 2 + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson_fl_30" "t1" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson_fl_30" "t1" +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_30" "t1" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_30"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_30"'; + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_30"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.2.5.LinqService,100).sql b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.2.5.LinqService,100).sql index 8fea23333976..ae792fe53815 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.2.5.LinqService,100).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.2.5.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id", + "s"."Value", + "s"."ValueStr" + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.2.5.LinqService,200).sql b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.2.5.LinqService,200).sql index 8fea23333976..ae792fe53815 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.2.5.LinqService,200).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.2.5.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id", + "s"."Value", + "s"."ValueStr" + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,100).sql b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,100).sql index 8fea23333976..31bbad1c009d 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,100).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,200).sql b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,200).sql index 8fea23333976..0ea81e60c9ce 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,200).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,100).sql b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,100).sql index 8fea23333976..b257a611def2 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,100).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id" + 1, + "s"."ValueStr" || CAST(1 AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,200).sql b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,200).sql index 8fea23333976..b257a611def2 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,200).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.2.5.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id" + 1, + "s"."ValueStr" || CAST(1 AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..33a1dbdc067f --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..669626f142fc --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + "c_1"."ParentID", + CAST(@id AS Int) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = 11 + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..669626f142fc --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + "c_1"."ParentID", + CAST(@id AS Int) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = 11 + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.2.5.LinqService).sql index 484cc70946df..9c0a5fd9d0f2 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.2.5.LinqService).sql @@ -1,5 +1,59 @@ BeforeExecute -- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "xxPerson_fl_31" + ( + "FirstName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "MiddleName" VarChar(255) CHARACTER SET UNICODE_FSS, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_fl_31" PRIMARY KEY ("PersonID") + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_xxPerson_fl_31" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_xxPerson_fl_31" FOR "xxPerson_fl_31" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW."PersonID" = GEN_ID("GIDENTITY_xxPerson_fl_31", 1); + END + '; +END + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson_fl_31" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) DECLARE @FirstName VarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName VarChar(4) -- String @@ -58,3 +112,43 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_31" "t1" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_31" "p" +WHERE + "p"."FirstName" = 'Steven' AND "p"."LastName" = 'King' AND + "p"."Gender" = 'M' + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_31"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_31"'; + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_31"'; +END + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_xxPerson_fl_31')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_31"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_xxPerson_fl_31')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_31"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPerson_fl_31')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_31"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.2.5.LinqService).sql index d7cb15566860..a6056f83a398 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.2.5.LinqService).sql @@ -33,3 +33,100 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc0' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc1' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc2' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT FIRST 2 + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..897e8462ddd7 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.2.5.LinqService).sql @@ -0,0 +1,155 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPatient21')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPatient21"'; +END + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +CREATE TABLE "xxPatient21" +( + "PersonID" Int NOT NULL, + "Diagnosis" VarChar(255) CHARACTER SET UNICODE_FSS, + + CONSTRAINT "PK_xxPatient21" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient21" "t1" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient21" "t1" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPatient21')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPatient21"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.2.5.LinqService).sql index d7cb15566860..019d7d0ff78d 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.2.5.LinqService).sql @@ -33,3 +33,100 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT FIRST 2 + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.2.5.LinqService).sql index d7cb15566860..5a3f69d2cce2 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.2.5.LinqService).sql @@ -33,3 +33,106 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 +DECLARE @id Integer -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 +DECLARE @id Integer -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 +DECLARE @id Integer -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT FIRST 2 + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.2.5.LinqService).sql index d08f7990a74a..3aa4d52999e7 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.2.5.LinqService).sql @@ -26,6 +26,20 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT FIRST 2 + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = 'John' AND "p"."LastName" = 'Shepard' + BeforeExecute -- Firebird.2.5 Firebird diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.2.5.LinqService).sql index d08f7990a74a..3aa4d52999e7 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.2.5.LinqService).sql @@ -26,6 +26,20 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT FIRST 2 + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = 'John' AND "p"."LastName" = 'Shepard' + BeforeExecute -- Firebird.2.5 Firebird diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.2.5.LinqService).sql index a96856410bb5..b0894c2c1265 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.2.5.LinqService).sql @@ -36,6 +36,22 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John0' + +SELECT FIRST 2 + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = @p AND "p"."LastName" = 'Shepard' + BeforeExecute -- Firebird.2.5 Firebird (asynchronously) DECLARE @FirstName VarChar(5) -- String @@ -66,6 +82,22 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John1' + +SELECT FIRST 2 + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = @p AND "p"."LastName" = 'Shepard' + BeforeExecute -- Firebird.2.5 Firebird diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.2.5.LinqService,1).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.2.5.LinqService,1).sql index aaadc82d540e..570b2d695566 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.2.5.LinqService,1).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.2.5.LinqService,1).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.2.5 Firebird +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.2.5.LinqService,2).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.2.5.LinqService,2).sql index aaadc82d540e..d4233a5463e0 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.2.5.LinqService,2).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.2.5.LinqService,2).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.2.5 Firebird +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,1).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,1).sql index aaadc82d540e..9e5e9306ef15 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,1).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,1).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.2.5 Firebird +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,2).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,2).sql index aaadc82d540e..f50ed7e1de9d 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,2).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,2).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.2.5 Firebird +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.2.5.LinqService,100).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.2.5.LinqService,100).sql index bb1312507c01..e934ceafd8e5 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.2.5.LinqService,100).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.2.5.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) +FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- Firebird.2.5 Firebird DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.2.5.LinqService,200).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.2.5.LinqService,200).sql index 37451a3e42a5..5f9f72e5e918 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.2.5.LinqService,200).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.2.5.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) +FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- Firebird.2.5 Firebird DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.2.5.LinqService,1).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.2.5.LinqService,1).sql index aaadc82d540e..54f608d4b7ee 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.2.5.LinqService,1).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.2.5.LinqService,1).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.2.5 Firebird +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Id", + "Value", + "ValueStr" +) +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.2.5.LinqService,2).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.2.5.LinqService,2).sql index aaadc82d540e..6dcdeebf1a09 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.2.5.LinqService,2).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.2.5.LinqService,2).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.2.5 Firebird +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Id", + "Value", + "ValueStr" +) +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,1).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,1).sql index aaadc82d540e..9e5e9306ef15 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,1).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,1).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.2.5 Firebird +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,2).sql b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,2).sql index aaadc82d540e..f50ed7e1de9d 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,2).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.2.5.LinqService,2).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.2.5 Firebird +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.2.5.LinqService).sql index 40db1678f56b..035583d20b78 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.2.5.LinqService).sql @@ -218,6 +218,45 @@ VALUES @Field4 ) +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" + WHERE + "t1"."Id" = 5 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Firebird.2.5 Firebird diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.2.5.LinqService).sql index 40db1678f56b..5794629b2ab3 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.2.5.LinqService).sql @@ -218,6 +218,43 @@ VALUES @Field4 ) +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Firebird.2.5 Firebird diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..cd1cfd886ca0 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = ( + SELECT + "p2_1"."ParentID" + FROM + "Parent" "p1_1" + INNER JOIN "Parent" "p2_1" ON "p1_1"."ParentID" = "p2_1"."ParentID" + WHERE + "p1_1"."ParentID" < 3 AND "Parent"."ParentID" = "p1_1"."ParentID" AND + ("Parent"."Value1" = "p1_1"."Value1" OR "Parent"."Value1" IS NULL AND "p1_1"."Value1" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "Parent" "p1" + INNER JOIN "Parent" "p2" ON "p1"."ParentID" = "p2"."ParentID" + WHERE + "p1"."ParentID" < 3 AND "Parent"."ParentID" = "p1"."ParentID" AND + ("Parent"."Value1" = "p1"."Value1" OR "Parent"."Value1" IS NULL AND "p1"."Value1" IS NULL) + ) + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..daef360ea09a --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" "p" +SET + "ParentID" = "p"."ParentID" + 1 +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @p + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..daef360ea09a --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" "p" +SET + "ParentID" = "p"."ParentID" + 1 +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @p + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..b1ffd8505e45 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "c_1" + LEFT JOIN "Parent" "a_Parent" ON "c_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "c_1"."ChildID" = @id AND + "a_Parent"."Value1" = 1 AND + "Child"."ParentID" = "c_1"."ParentID" AND + "Child"."ChildID" = "c_1"."ChildID" + ) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @p + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..c84a0818c307 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.2.5.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "child_1" + LEFT JOIN "Parent" "a_Parent" ON "child_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "child_1"."ChildID" = 10000 AND "Parent"."ParentID" = "a_Parent"."ParentID" AND + ("Parent"."Value1" = "a_Parent"."Value1" OR "Parent"."Value1" IS NULL AND "a_Parent"."Value1" IS NULL) + ) + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..c84a0818c307 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.2.5.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "child_1" + LEFT JOIN "Parent" "a_Parent" ON "child_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "child_1"."ChildID" = 10000 AND "Parent"."ParentID" = "a_Parent"."ParentID" AND + ("Parent"."Value1" = "a_Parent"."Value1" OR "Parent"."Value1" IS NULL AND "a_Parent"."Value1" IS NULL) + ) + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.2.5.LinqService).sql new file mode 100644 index 000000000000..dbd3057dad77 --- /dev/null +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.2.5.LinqService).sql @@ -0,0 +1,130 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_xxPerson_fl_33')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_33"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_xxPerson_fl_33')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_33"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPerson_fl_33')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_33"'; +END + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "xxPerson_fl_33" + ( + "FirstName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "MiddleName" VarChar(255) CHARACTER SET UNICODE_FSS, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_fl_33" PRIMARY KEY ("PersonID") + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_xxPerson_fl_33" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_xxPerson_fl_33" FOR "xxPerson_fl_33" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW."PersonID" = GEN_ID("GIDENTITY_xxPerson_fl_33", 1); + END + '; +END + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson_fl_33" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_33" "t1" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT FIRST 2 + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson_fl_33" "t1" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +UPDATE + "xxPerson_fl_33" "t1" +SET + "FirstName" = CAST(@FirstName AS VARCHAR(6)), + "LastName" = CAST(@LastName AS VARCHAR(4)), + "MiddleName" = CAST(@MiddleName AS VARCHAR(4)), + "Gender" = CAST(@Gender AS Char(1)) +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT FIRST 2 + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson_fl_33" "t1" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_33"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_33"'; + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_33"'; +END + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.2.5.LinqService).sql index c0c9c2f3a812..41b9ad332254 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.2.5.LinqService).sql @@ -35,3 +35,58 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 6 + +SELECT FIRST 1 + "t1"."PersonID", + "t1"."Gender", + "t1"."FirstName", + "t1"."MiddleName", + "t1"."LastName" +FROM + "Person" "t1" +WHERE + "t1"."PersonID" = @id + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName VarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName VarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName VarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer -- Int32 +SET @ID = 6 + +UPDATE + "Person" "t1" +SET + "Gender" = CAST(@Gender AS CHAR(1)), + "FirstName" = CAST(@Name_FirstName AS VARCHAR(13)), + "MiddleName" = CAST(@Name_MiddleName AS VARCHAR(1)), + "LastName" = CAST(@Name_LastName AS VARCHAR(13)) +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 6 + +SELECT FIRST 1 + "t1"."PersonID", + "t1"."Gender", + "t1"."FirstName", + "t1"."MiddleName", + "t1"."LastName" +FROM + "Person" "t1" +WHERE + "t1"."PersonID" = @id + diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql index 9d4caced908d..336ea6614ef4 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql @@ -1,458 +1,63 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql index 9d4caced908d..ccdd25fbb714 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql @@ -1,458 +1,59 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql index 9d4caced908d..12d5002a62a9 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql @@ -1,458 +1,58 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + NEW."Value" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql index 9d4caced908d..336ea6614ef4 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql @@ -1,458 +1,63 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql index 9d4caced908d..ccdd25fbb714 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql @@ -1,458 +1,59 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql index 9d4caced908d..12d5002a62a9 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.2.5.LinqService).sql @@ -1,458 +1,58 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + NEW."Value" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql index 6423dcf86c0f..ccd6af2cdf0e 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql @@ -1,229 +1,18 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql index 6423dcf86c0f..29a5b2d9880e 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql @@ -1,229 +1,14 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.2.5.LinqService).sql index 6423dcf86c0f..4c254dcb8c35 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.2.5.LinqService).sql @@ -1,229 +1,13 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + NEW."Value" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql index 6423dcf86c0f..8190c9c2b6ce 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql @@ -1,229 +1,19 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Id" = "s"."Id", + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql index 6423dcf86c0f..50eeb094b38b 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(Firebird.2.5.LinqService).sql @@ -1,229 +1,15 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Id" = "s"."Id", + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.2.5.LinqService).sql b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.2.5.LinqService).sql index 6423dcf86c0f..d28543a87c81 100644 --- a/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.2.5.LinqService).sql +++ b/Firebird.2.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.2.5.LinqService).sql @@ -1,229 +1,14 @@ BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.2.5 Firebird - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.2.5 Firebird (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Id" = "s"."Id", + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + NEW."Value" diff --git a/Firebird.2.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.2.5).sql b/Firebird.2.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.2.5).sql new file mode 100644 index 000000000000..ee185d89cc22 --- /dev/null +++ b/Firebird.2.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.2.5).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.2.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.2.5).sql b/Firebird.2.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.2.5).sql new file mode 100644 index 000000000000..5ba39213f3fa --- /dev/null +++ b/Firebird.2.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.2.5).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.2.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.2.5).sql b/Firebird.2.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.2.5).sql new file mode 100644 index 000000000000..5ba39213f3fa --- /dev/null +++ b/Firebird.2.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.2.5).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.2.5 Firebird (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + From 036b23a5b53636654e78ee0b056a1aba75eeec0b Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:30:09 +0000 Subject: [PATCH 06/40] [Windows / SQL Server 2014] baselines --- ....All4Async(SqlServer.2014.LinqService).sql | 13 + ...upBy2Async(SqlServer.2014.LinqService).sql | 30 ++ ...rable1Test(SqlServer.2014.LinqService).sql | 9 + ...rable2Test(SqlServer.2014.LinqService).sql | 11 + ...eCast1Test(SqlServer.2014.LinqService).sql | 9 + ...eCast2Test(SqlServer.2014.LinqService).sql | 11 + ...sAsyncTest(SqlServer.2014.LinqService).sql | 13 + ...tAsyncTest(SqlServer.2014.LinqService).sql | 14 + ...keSkipTest(SqlServer.2014.LinqService).sql | 16 + ...tOrDefault(SqlServer.2014.LinqService).sql | 19 + ...pAsyncTest(SqlServer.2014.LinqService).sql | 21 + ...tAsyncTest(SqlServer.2014.LinqService).sql | 21 + ...yTestAsync(SqlServer.2014.LinqService).sql | 30 ++ ...TestAsync2(SqlServer.2014.LinqService).sql | 30 ++ ...AsyncdTest(SqlServer.2014.LinqService).sql | 15 + ...Test3Async(SqlServer.2014.LinqService).sql | 26 + ...sTestAsync(SqlServer.2014.LinqService).sql | 26 + ...tTestAsync(SqlServer.2014.LinqService).sql | 24 + ...TestAsync2(SqlServer.2014.LinqService).sql | 24 + ...TestAsync1(SqlServer.2014.LinqService).sql | 26 + ...TestAsync2(SqlServer.2014.LinqService).sql | 26 + ...xTestAsync(SqlServer.2014.LinqService).sql | 24 + ...TestAsync2(SqlServer.2014.LinqService).sql | 24 + ...icateAsync(SqlServer.2014.LinqService).sql | 174 +------ ...icateAsync(SqlServer.2014.LinqService).sql | 171 +------ ...icateAsync(SqlServer.2014.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2014.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2014.LinqService).sql | 171 +------ ...ectorAsync(SqlServer.2014.LinqService).sql | 171 +------ ...ectorAsync(SqlServer.2014.LinqService).sql | 171 +------ ...icateAsync(SqlServer.2014.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2014.LinqService).sql | 172 +------ ...ncat1Async(SqlServer.2014.LinqService).sql | 19 + ...ementAsync(SqlServer.2014.LinqService).sql | 99 ++++ ...teredAsync(SqlServer.2014.LinqService).sql | 84 ++++ ...ount1Async(SqlServer.2014.LinqService).sql | 8 + ...ount2Async(SqlServer.2014.LinqService).sql | 10 + ...yMax1Async(SqlServer.2014.LinqService).sql | 17 + ....Issue4602(SqlServer.2014.LinqService).sql | 54 +- ...4057_Async(SqlServer.2014.LinqService).sql | 29 ++ ...ransaction(SqlServer.2014.LinqService).sql | 29 ++ ...ssionAsync(SqlServer.2014.LinqService).sql | 25 + ...Cast1Async(SqlServer.2014.LinqService).sql | 11 + ...est18Async(SqlServer.2014.LinqService).sql | 14 + ...eter1Async(SqlServer.2014.LinqService).sql | 6 + ...ue3132Test(SqlServer.2014.LinqService).sql | 213 ++++++++ ...sync(SqlServer.2014.LinqService,False).sql | 16 + ...Async(SqlServer.2014.LinqService,True).sql | 16 + ...sync(SqlServer.2014.LinqService,False).sql | 16 + ...Async(SqlServer.2014.LinqService,True).sql | 16 + ...Skip1Async(SqlServer.2014.LinqService).sql | 86 +--- ...sync(SqlServer.2014.LinqService,False).sql | 18 + ...Async(SqlServer.2014.LinqService,True).sql | 22 + ...sync(SqlServer.2014.LinqService,False).sql | 11 + ...Async(SqlServer.2014.LinqService,True).sql | 11 + ...sync(SqlServer.2014.LinqService,False).sql | 11 + ...Async(SqlServer.2014.LinqService,True).sql | 13 + ...sync(SqlServer.2014.LinqService,False).sql | 11 + ...Async(SqlServer.2014.LinqService,True).sql | 13 + ...sync(SqlServer.2014.LinqService,False).sql | 9 + ...Async(SqlServer.2014.LinqService,True).sql | 11 + ...er.2014.LinqService,False,False,False).sql | 17 + ...ver.2014.LinqService,False,False,True).sql | 17 + ...ver.2014.LinqService,False,True,False).sql | 17 + ...rver.2014.LinqService,False,True,True).sql | 17 + ...able1Async(SqlServer.2014.LinqService).sql | 35 ++ ...TableAsync(SqlServer.2014.LinqService).sql | 33 ++ ...eNameAsync(SqlServer.2014.LinqService).sql | 90 ++++ ...ncTest(SqlServer.2014.LinqService,100).sql | 19 + ...ncTest(SqlServer.2014.LinqService,200).sql | 19 + ...Record(SqlServer.2014.LinqService,100).sql | 13 + ...Record(SqlServer.2014.LinqService,200).sql | 13 + ...ncTest(SqlServer.2014.LinqService,100).sql | 15 + ...ncTest(SqlServer.2014.LinqService,200).sql | 15 + ...Record(SqlServer.2014.LinqService,100).sql | 15 + ...Record(SqlServer.2014.LinqService,200).sql | 15 + ...ncTest(SqlServer.2014.LinqService,100).sql | 21 + ...ncTest(SqlServer.2014.LinqService,200).sql | 21 + ...ncTest(SqlServer.2014.LinqService,100).sql | 12 + ...ncTest(SqlServer.2014.LinqService,200).sql | 12 + ...Record(SqlServer.2014.LinqService,100).sql | 12 + ...Record(SqlServer.2014.LinqService,200).sql | 12 + ...sert2Async(SqlServer.2014.LinqService).sql | 46 ++ ...sert3Async(SqlServer.2014.LinqService).sql | 48 ++ ...sert4Async(SqlServer.2014.LinqService).sql | 48 ++ ...eNameAsync(SqlServer.2014.LinqService).sql | 70 +++ ...lace1Async(SqlServer.2014.LinqService).sql | 97 ++++ ...eNameAsync(SqlServer.2014.LinqService).sql | 151 ++++++ ...date3Async(SqlServer.2014.LinqService).sql | 97 ++++ ...ate3xAsync(SqlServer.2014.LinqService).sql | 103 ++++ ...tity1Async(SqlServer.2014.LinqService).sql | 14 + ...tity2Async(SqlServer.2014.LinqService).sql | 14 + ...tity4Async(SqlServer.2014.LinqService).sql | 32 ++ ...syncTest(SqlServer.2014.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2014.LinqService,2).sql | 43 +- ...syncTest(SqlServer.2014.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2014.LinqService,2).sql | 43 +- ...tAsync(SqlServer.2014.LinqService,100).sql | 24 + ...tAsync(SqlServer.2014.LinqService,200).sql | 24 + ...Record(SqlServer.2014.LinqService,100).sql | 24 + ...Record(SqlServer.2014.LinqService,200).sql | 24 + ...syncTest(SqlServer.2014.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2014.LinqService,2).sql | 43 +- ...syncTest(SqlServer.2014.LinqService,1).sql | 43 +- ...syncTest(SqlServer.2014.LinqService,2).sql | 43 +- ...tFullAsync(SqlServer.2014.LinqService).sql | 54 ++ ...ctionAsync(SqlServer.2014.LinqService).sql | 53 ++ ...mQueryAsyn(SqlServer.2014.LinqService).sql | 40 ++ ...mTableAsyn(SqlServer.2014.LinqService).sql | 38 ++ ...ate12Async(SqlServer.2014.LinqService).sql | 13 + ...date1Async(SqlServer.2014.LinqService).sql | 54 ++ ...date2Async(SqlServer.2014.LinqService).sql | 54 ++ ...date4Async(SqlServer.2014.LinqService).sql | 55 +++ ...tion1Async(SqlServer.2014.LinqService).sql | 41 ++ ...n1AsyncOld(SqlServer.2014.LinqService).sql | 41 ++ ...eNameAsync(SqlServer.2014.LinqService).sql | 106 ++++ ...plex1Async(SqlServer.2014.LinqService).sql | 55 +++ ...oTestAsync(SqlServer.2014.LinqService).sql | 23 + ...tTestAsync(SqlServer.2014.LinqService).sql | 458 +---------------- ...ngleRecord(SqlServer.2014.LinqService).sql | 460 +----------------- ...oTestAsync(SqlServer.2014.LinqService).sql | 23 + ...tTestAsync(SqlServer.2014.LinqService).sql | 455 +---------------- ...nateUpdate(SqlServer.2014.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2014.LinqService).sql | 456 +---------------- ...WithoutOld(SqlServer.2014.LinqService).sql | 454 +---------------- ...nateUpdate(SqlServer.2014.LinqService).sql | 453 +---------------- ...ngleRecord(SqlServer.2014.LinqService).sql | 455 +---------------- ...oTestAsync(SqlServer.2014.LinqService).sql | 23 + ...tTestAsync(SqlServer.2014.LinqService).sql | 458 +---------------- ...ngleRecord(SqlServer.2014.LinqService).sql | 460 +----------------- ...oTestAsync(SqlServer.2014.LinqService).sql | 23 + ...tTestAsync(SqlServer.2014.LinqService).sql | 455 +---------------- ...nateUpdate(SqlServer.2014.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2014.LinqService).sql | 456 +---------------- ...WithoutOld(SqlServer.2014.LinqService).sql | 454 +---------------- ...nateUpdate(SqlServer.2014.LinqService).sql | 453 +---------------- ...ngleRecord(SqlServer.2014.LinqService).sql | 455 +---------------- ...oTestAsync(SqlServer.2014.LinqService).sql | 21 + ...tTestAsync(SqlServer.2014.LinqService).sql | 235 +-------- ...ngleRecord(SqlServer.2014.LinqService).sql | 235 +-------- ...tTestAsync(SqlServer.2014.LinqService).sql | 231 +-------- ...ngleRecord(SqlServer.2014.LinqService).sql | 231 +-------- ...WithoutOld(SqlServer.2014.LinqService).sql | 230 +-------- ...ngleRecord(SqlServer.2014.LinqService).sql | 230 +-------- ...tIntoAsync(SqlServer.2014.LinqService).sql | 21 + ...oTestAsync(SqlServer.2014.LinqService).sql | 22 + ...tTestAsync(SqlServer.2014.LinqService).sql | 236 +-------- ...ngleRecord(SqlServer.2014.LinqService).sql | 236 +-------- ...tTestAsync(SqlServer.2014.LinqService).sql | 232 +-------- ...ngleRecord(SqlServer.2014.LinqService).sql | 232 +-------- ...WithoutOld(SqlServer.2014.LinqService).sql | 231 +-------- ...ngleRecord(SqlServer.2014.LinqService).sql | 231 +-------- ...tIntoAsync(SqlServer.2014.LinqService).sql | 22 + ...l4Async(SqlServer.2014.MS.LinqService).sql | 13 + ...y2Async(SqlServer.2014.MS.LinqService).sql | 30 ++ ...le1Test(SqlServer.2014.MS.LinqService).sql | 9 + ...le2Test(SqlServer.2014.MS.LinqService).sql | 11 + ...st1Test(SqlServer.2014.MS.LinqService).sql | 9 + ...st2Test(SqlServer.2014.MS.LinqService).sql | 11 + ...yncTest(SqlServer.2014.MS.LinqService).sql | 13 + ...yncTest(SqlServer.2014.MS.LinqService).sql | 14 + ...kipTest(SqlServer.2014.MS.LinqService).sql | 16 + ...Default(SqlServer.2014.MS.LinqService).sql | 19 + ...yncTest(SqlServer.2014.MS.LinqService).sql | 21 + ...yncTest(SqlServer.2014.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2014.MS.LinqService).sql | 30 ++ ...tAsync2(SqlServer.2014.MS.LinqService).sql | 30 ++ ...ncdTest(SqlServer.2014.MS.LinqService).sql | 15 + ...t3Async(SqlServer.2014.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2014.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2014.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2014.MS.LinqService).sql | 24 + ...tAsync1(SqlServer.2014.MS.LinqService).sql | 26 + ...tAsync2(SqlServer.2014.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2014.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2014.MS.LinqService).sql | 24 + ...teAsync(SqlServer.2014.MS.LinqService).sql | 174 +------ ...teAsync(SqlServer.2014.MS.LinqService).sql | 171 +------ ...teAsync(SqlServer.2014.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2014.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2014.MS.LinqService).sql | 171 +------ ...orAsync(SqlServer.2014.MS.LinqService).sql | 171 +------ ...orAsync(SqlServer.2014.MS.LinqService).sql | 171 +------ ...teAsync(SqlServer.2014.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2014.MS.LinqService).sql | 172 +------ ...t1Async(SqlServer.2014.MS.LinqService).sql | 19 + ...ntAsync(SqlServer.2014.MS.LinqService).sql | 99 ++++ ...edAsync(SqlServer.2014.MS.LinqService).sql | 84 ++++ ...t1Async(SqlServer.2014.MS.LinqService).sql | 8 + ...t2Async(SqlServer.2014.MS.LinqService).sql | 10 + ...x1Async(SqlServer.2014.MS.LinqService).sql | 17 + ...sue4602(SqlServer.2014.MS.LinqService).sql | 54 +- ...7_Async(SqlServer.2014.MS.LinqService).sql | 29 ++ ...saction(SqlServer.2014.MS.LinqService).sql | 29 ++ ...onAsync(SqlServer.2014.MS.LinqService).sql | 25 + ...t1Async(SqlServer.2014.MS.LinqService).sql | 11 + ...18Async(SqlServer.2014.MS.LinqService).sql | 14 + ...r1Async(SqlServer.2014.MS.LinqService).sql | 6 + ...132Test(SqlServer.2014.MS.LinqService).sql | 213 ++++++++ ...c(SqlServer.2014.MS.LinqService,False).sql | 16 + ...nc(SqlServer.2014.MS.LinqService,True).sql | 16 + ...c(SqlServer.2014.MS.LinqService,False).sql | 16 + ...nc(SqlServer.2014.MS.LinqService,True).sql | 16 + ...p1Async(SqlServer.2014.MS.LinqService).sql | 86 +--- ...c(SqlServer.2014.MS.LinqService,False).sql | 18 + ...nc(SqlServer.2014.MS.LinqService,True).sql | 22 + ...c(SqlServer.2014.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2014.MS.LinqService,True).sql | 11 + ...c(SqlServer.2014.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2014.MS.LinqService,True).sql | 13 + ...c(SqlServer.2014.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2014.MS.LinqService,True).sql | 13 + ...c(SqlServer.2014.MS.LinqService,False).sql | 9 + ...nc(SqlServer.2014.MS.LinqService,True).sql | 11 + ...2014.MS.LinqService,False,False,False).sql | 17 + ....2014.MS.LinqService,False,False,True).sql | 17 + ....2014.MS.LinqService,False,True,False).sql | 17 + ...r.2014.MS.LinqService,False,True,True).sql | 17 + ...e1Async(SqlServer.2014.MS.LinqService).sql | 35 ++ ...leAsync(SqlServer.2014.MS.LinqService).sql | 33 ++ ...meAsync(SqlServer.2014.MS.LinqService).sql | 90 ++++ ...est(SqlServer.2014.MS.LinqService,100).sql | 19 + ...est(SqlServer.2014.MS.LinqService,200).sql | 19 + ...ord(SqlServer.2014.MS.LinqService,100).sql | 13 + ...ord(SqlServer.2014.MS.LinqService,200).sql | 13 + ...est(SqlServer.2014.MS.LinqService,100).sql | 15 + ...est(SqlServer.2014.MS.LinqService,200).sql | 15 + ...ord(SqlServer.2014.MS.LinqService,100).sql | 15 + ...ord(SqlServer.2014.MS.LinqService,200).sql | 15 + ...est(SqlServer.2014.MS.LinqService,100).sql | 21 + ...est(SqlServer.2014.MS.LinqService,200).sql | 21 + ...est(SqlServer.2014.MS.LinqService,100).sql | 12 + ...est(SqlServer.2014.MS.LinqService,200).sql | 12 + ...ord(SqlServer.2014.MS.LinqService,100).sql | 12 + ...ord(SqlServer.2014.MS.LinqService,200).sql | 12 + ...t2Async(SqlServer.2014.MS.LinqService).sql | 46 ++ ...t3Async(SqlServer.2014.MS.LinqService).sql | 48 ++ ...t4Async(SqlServer.2014.MS.LinqService).sql | 48 ++ ...meAsync(SqlServer.2014.MS.LinqService).sql | 70 +++ ...e1Async(SqlServer.2014.MS.LinqService).sql | 97 ++++ ...meAsync(SqlServer.2014.MS.LinqService).sql | 151 ++++++ ...e3Async(SqlServer.2014.MS.LinqService).sql | 97 ++++ ...3xAsync(SqlServer.2014.MS.LinqService).sql | 103 ++++ ...y1Async(SqlServer.2014.MS.LinqService).sql | 14 + ...y2Async(SqlServer.2014.MS.LinqService).sql | 14 + ...y4Async(SqlServer.2014.MS.LinqService).sql | 32 ++ ...cTest(SqlServer.2014.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2014.MS.LinqService,2).sql | 43 +- ...cTest(SqlServer.2014.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2014.MS.LinqService,2).sql | 43 +- ...ync(SqlServer.2014.MS.LinqService,100).sql | 24 + ...ync(SqlServer.2014.MS.LinqService,200).sql | 24 + ...ord(SqlServer.2014.MS.LinqService,100).sql | 24 + ...ord(SqlServer.2014.MS.LinqService,200).sql | 24 + ...cTest(SqlServer.2014.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2014.MS.LinqService,2).sql | 43 +- ...cTest(SqlServer.2014.MS.LinqService,1).sql | 43 +- ...cTest(SqlServer.2014.MS.LinqService,2).sql | 43 +- ...llAsync(SqlServer.2014.MS.LinqService).sql | 54 ++ ...onAsync(SqlServer.2014.MS.LinqService).sql | 53 ++ ...eryAsyn(SqlServer.2014.MS.LinqService).sql | 40 ++ ...bleAsyn(SqlServer.2014.MS.LinqService).sql | 38 ++ ...12Async(SqlServer.2014.MS.LinqService).sql | 13 + ...e1Async(SqlServer.2014.MS.LinqService).sql | 54 ++ ...e2Async(SqlServer.2014.MS.LinqService).sql | 54 ++ ...e4Async(SqlServer.2014.MS.LinqService).sql | 55 +++ ...n1Async(SqlServer.2014.MS.LinqService).sql | 41 ++ ...syncOld(SqlServer.2014.MS.LinqService).sql | 41 ++ ...meAsync(SqlServer.2014.MS.LinqService).sql | 106 ++++ ...x1Async(SqlServer.2014.MS.LinqService).sql | 55 +++ ...stAsync(SqlServer.2014.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2014.MS.LinqService).sql | 458 +---------------- ...eRecord(SqlServer.2014.MS.LinqService).sql | 460 +----------------- ...stAsync(SqlServer.2014.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2014.MS.LinqService).sql | 455 +---------------- ...eUpdate(SqlServer.2014.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2014.MS.LinqService).sql | 456 +---------------- ...houtOld(SqlServer.2014.MS.LinqService).sql | 454 +---------------- ...eUpdate(SqlServer.2014.MS.LinqService).sql | 453 +---------------- ...eRecord(SqlServer.2014.MS.LinqService).sql | 455 +---------------- ...stAsync(SqlServer.2014.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2014.MS.LinqService).sql | 458 +---------------- ...eRecord(SqlServer.2014.MS.LinqService).sql | 460 +----------------- ...stAsync(SqlServer.2014.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2014.MS.LinqService).sql | 455 +---------------- ...eUpdate(SqlServer.2014.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2014.MS.LinqService).sql | 456 +---------------- ...houtOld(SqlServer.2014.MS.LinqService).sql | 454 +---------------- ...eUpdate(SqlServer.2014.MS.LinqService).sql | 453 +---------------- ...eRecord(SqlServer.2014.MS.LinqService).sql | 455 +---------------- ...stAsync(SqlServer.2014.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2014.MS.LinqService).sql | 235 +-------- ...eRecord(SqlServer.2014.MS.LinqService).sql | 235 +-------- ...stAsync(SqlServer.2014.MS.LinqService).sql | 231 +-------- ...eRecord(SqlServer.2014.MS.LinqService).sql | 231 +-------- ...houtOld(SqlServer.2014.MS.LinqService).sql | 230 +-------- ...eRecord(SqlServer.2014.MS.LinqService).sql | 230 +-------- ...toAsync(SqlServer.2014.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2014.MS.LinqService).sql | 22 + ...stAsync(SqlServer.2014.MS.LinqService).sql | 236 +-------- ...eRecord(SqlServer.2014.MS.LinqService).sql | 236 +-------- ...stAsync(SqlServer.2014.MS.LinqService).sql | 232 +-------- ...eRecord(SqlServer.2014.MS.LinqService).sql | 232 +-------- ...houtOld(SqlServer.2014.MS.LinqService).sql | 231 +-------- ...eRecord(SqlServer.2014.MS.LinqService).sql | 231 +-------- ...toAsync(SqlServer.2014.MS.LinqService).sql | 22 + ...inq.AsyncTests.Test(SqlServer.2014.MS).sql | 18 + ...nq.AsyncTests.Test1(SqlServer.2014.MS).sql | 9 + ...ncTests.TestForEach(SqlServer.2014.MS).sql | 9 + ...s.Linq.AsyncTests.Test(SqlServer.2014).sql | 18 + ....Linq.AsyncTests.Test1(SqlServer.2014).sql | 9 + ...AsyncTests.TestForEach(SqlServer.2014).sql | 9 + 312 files changed, 8014 insertions(+), 22794 deletions(-) create mode 100644 SqlServer.2014.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.LinqService,False).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.LinqService,True).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.LinqService,False).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.LinqService,True).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.LinqService,False).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.LinqService,True).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.LinqService,False).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.LinqService,True).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.LinqService,False).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.LinqService,True).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.LinqService,False).sql create mode 100644 SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.LinqService,True).sql create mode 100644 SqlServer.2014.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2014.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.MS.LinqService,False).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.MS.LinqService,True).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.MS.LinqService,False).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.MS.LinqService,True).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.MS.LinqService,False).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.MS.LinqService,True).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.MS.LinqService,False).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.MS.LinqService,True).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.MS.LinqService,False).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.MS.LinqService,True).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.MS.LinqService,False).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.MS.LinqService,True).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2014.MS.LinqService).sql create mode 100644 SqlServer.2014.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2014.MS).sql create mode 100644 SqlServer.2014.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2014.MS).sql create mode 100644 SqlServer.2014.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2014.MS).sql create mode 100644 SqlServer.2014/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2014).sql create mode 100644 SqlServer.2014/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2014).sql create mode 100644 SqlServer.2014/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2014).sql diff --git a/SqlServer.2014.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..67bdbf325113 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.2014.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..ee7318f4a2f1 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..c62a7b63e120 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2014.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..dec9b3d7d598 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2014.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..c62a7b63e120 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2014.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..dec9b3d7d598 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2014.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..d417b3a417b9 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2014.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..5b0c98b33932 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2014.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2014.LinqService).sql index f0d407f3be05..8ae9b2e3e872 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2014.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..eff5a21d42ad --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2014.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..b7ba58786ee9 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2014.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..b7ba58786ee9 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2014.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..dd46e4d7c9fd --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2014.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..dd46e4d7c9fd --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2014.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..1818d077def0 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2014.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..e129312d1861 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..f204c8881c53 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2014.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..5f20decf4d13 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2014.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..5f20decf4d13 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2014.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..3a28ac19c363 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2014.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..3a28ac19c363 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2014.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..a2b0a88b70ae --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2014.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..a2b0a88b70ae --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2014.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2014.LinqService).sql index f504af508813..a2a25003f6f0 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2014.LinqService).sql @@ -1,163 +1,15 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2014.LinqService).sql index f504af508813..eebd6edf8e4c 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2014.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2014.LinqService).sql index f504af508813..8a4809414304 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2014.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2014.LinqService).sql index f504af508813..8a4809414304 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2014.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2014.LinqService).sql index f504af508813..eebd6edf8e4c 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2014.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2014.LinqService).sql index f504af508813..8673d2c5595e 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2014.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2014.LinqService).sql index f504af508813..56a4fab41e5d 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2014.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2014.LinqService).sql index f504af508813..a8765ea551f1 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2014.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2014.LinqService).sql index f504af508813..a8765ea551f1 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2014.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2014.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..a9eb8fc4e536 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2014.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2014.LinqService).sql index e7a64a7d902a..cd46d6c823e4 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2014.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2014 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014 diff --git a/SqlServer.2014.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2014.LinqService).sql index 433892f669ef..19ae81f70586 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2014.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2014 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014 diff --git a/SqlServer.2014.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..92e1784f008e --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..18eb18a4908f --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2014.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..0fd10a0148de --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2014.LinqService).sql index ecad62df4048..471143e6eed1 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2014.LinqService).sql @@ -1,47 +1,11 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] +-- SqlServer.2014 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2014.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2014.LinqService).sql index d7df2adde4b6..0c78d47720eb 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2014.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2014 (asynchronously) diff --git a/SqlServer.2014.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2014.LinqService).sql index 10ac5bf75a49..52012ff1e5e3 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2014.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2014 (asynchronously) diff --git a/SqlServer.2014.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..b0a15f1f91e3 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2014.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..6d646d1103c7 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2014.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..a40faf177c6a --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2014.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..183402e7d3fa --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2014.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..e47534a1337c --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2014.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.LinqService,False).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.LinqService,False).sql new file mode 100644 index 000000000000..7f34769cde6b --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.LinqService,True).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.LinqService,True).sql new file mode 100644 index 000000000000..7f34769cde6b --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.LinqService,False).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.LinqService,False).sql new file mode 100644 index 000000000000..7f34769cde6b --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.LinqService,True).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.LinqService,True).sql new file mode 100644 index 000000000000..7f34769cde6b --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2014.LinqService).sql index a8d3733eb2f0..bf04880f33dd 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2014.LinqService).sql @@ -1,77 +1,13 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] +-- SqlServer.2014 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.LinqService,False).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.LinqService,False).sql index ce50952fa1c1..53208bf542ff 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.LinqService,False).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.LinqService,True).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.LinqService,True).sql index d44610984768..c68efdbecd5b 100644 --- a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.LinqService,True).sql +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.LinqService,False).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.LinqService,False).sql new file mode 100644 index 000000000000..177585064026 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.LinqService,True).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.LinqService,True).sql new file mode 100644 index 000000000000..177585064026 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.LinqService,False).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.LinqService,False).sql new file mode 100644 index 000000000000..1355b4eebfa6 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.LinqService,True).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.LinqService,True).sql new file mode 100644 index 000000000000..1912e63abb79 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.LinqService,False).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.LinqService,False).sql new file mode 100644 index 000000000000..b730ad637a76 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.LinqService,True).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.LinqService,True).sql new file mode 100644 index 000000000000..98c0325d6d7d --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.LinqService,False).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.LinqService,False).sql new file mode 100644 index 000000000000..cc11d7368eff --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.LinqService,True).sql b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.LinqService,True).sql new file mode 100644 index 000000000000..329eb4501e1d --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,False,False).sql b/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,False,False).sql index e1837f2ad421..4f2db3723183 100644 --- a/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,False,False).sql +++ b/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,False,False).sql @@ -4,3 +4,20 @@ IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2014 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,False,True).sql b/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,False,True).sql index a0a433d59fe9..e786d7ebc564 100644 --- a/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,False,True).sql +++ b/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,False,True).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2014 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,True,False).sql b/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,True,False).sql index bb9186801f75..ba3e853018bd 100644 --- a/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,True,False).sql +++ b/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,True,False).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2014 (asynchronously) + +CREATE TABLE [TestData]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,True,True).sql b/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,True,True).sql index 935b777f3bde..83d7674e5c28 100644 --- a/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,True,True).sql +++ b/SqlServer.2014.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.LinqService,False,True,True).sql @@ -20,3 +20,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2014 (asynchronously) + +CREATE TABLE [TestData].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..bbcd50a6d9ee --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,35 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[TestTable]', N'U') IS NOT NULL) + DROP TABLE [TestTable] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2014.LinqService).sql index 801fe91b1dce..011ad8fb8c69 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2014.LinqService).sql @@ -1,4 +1,31 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2014 SELECT @@ -7,3 +34,9 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..d1f5e96dc02b --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2014.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.LinqService,100).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.LinqService,100).sql index e686fcd1b348..1ff4b134a9ee 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.LinqService,100).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.LinqService,100).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.LinqService,200).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.LinqService,200).sql index e686fcd1b348..1ff4b134a9ee 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.LinqService,200).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.LinqService,200).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.LinqService,100).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.LinqService,100).sql index f3547d1e392a..7a9eff855bb0 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.LinqService,100).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.LinqService,200).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.LinqService,200).sql index f3547d1e392a..7a9eff855bb0 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.LinqService,200).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.LinqService,100).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.LinqService,100).sql index e686fcd1b348..b4ff434264c3 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.LinqService,100).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.LinqService,200).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.LinqService,200).sql index e686fcd1b348..b5e9397ed512 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.LinqService,200).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,100).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,100).sql index f3547d1e392a..9d9b9d69271d 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,100).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,200).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,200).sql index f3547d1e392a..bbba1df9f065 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,200).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.LinqService,100).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.LinqService,100).sql index eacda1a088e6..20a76ad5f0f5 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.LinqService,100).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2014 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.LinqService,200).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.LinqService,200).sql index eacda1a088e6..62abf57be1f2 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.LinqService,200).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2014 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.LinqService,100).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.LinqService,100).sql index e686fcd1b348..f014bddd47c6 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.LinqService,100).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.LinqService,200).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.LinqService,200).sql index e686fcd1b348..f014bddd47c6 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.LinqService,200).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,100).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,100).sql index f3547d1e392a..fa5544d1a072 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,100).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,200).sql b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,200).sql index f3547d1e392a..fa5544d1a072 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,200).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..78d6d2a6f2e9 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..2f583eb276e8 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..2f583eb276e8 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2014.LinqService).sql index 76338a390130..06b0a9fd4b41 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2014.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2014 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,33 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2014.LinqService).sql index 3da6192db2da..841c17f0cf88 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2014.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..6e3a75af861f --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2014.LinqService).sql @@ -0,0 +1,151 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2014.LinqService).sql index 3da6192db2da..85b1118b6a98 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2014.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2014.LinqService).sql index 3da6192db2da..17a4a40bca19 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2014.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2014.LinqService).sql index 55d732b43c6f..d96637077793 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2014.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2014 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2014.LinqService).sql index 55d732b43c6f..d96637077793 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2014.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2014 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2014.LinqService).sql index 25f2d546c36c..29a6113c61b3 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2014.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2014 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2014 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.LinqService,1).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.LinqService,1).sql index 3775b06230c6..3493b4e97dd4 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.LinqService,1).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014 +-- SqlServer.2014 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.LinqService,2).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.LinqService,2).sql index 3775b06230c6..d0e92846f2b8 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.LinqService,2).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014 +-- SqlServer.2014 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,1).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,1).sql index 3775b06230c6..959ba23e96bf 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,1).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014 +-- SqlServer.2014 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,2).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,2).sql index 3775b06230c6..abd4df8dc48d 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,2).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014 +-- SqlServer.2014 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.LinqService,100).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.LinqService,100).sql index 920718f2c2d7..f2344524aab3 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.LinqService,100).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2014 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.LinqService,200).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.LinqService,200).sql index b2d8ea39b859..1f7ecf24c0bf 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.LinqService,200).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2014 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.LinqService,100).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.LinqService,100).sql index 60c08dd20da2..2db0f7175c92 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.LinqService,100).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2014 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.LinqService,200).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.LinqService,200).sql index e3d60c86c139..e345fb5640d3 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.LinqService,200).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2014 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.LinqService,1).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.LinqService,1).sql index 3775b06230c6..68af3a2f2e65 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.LinqService,1).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014 +-- SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.LinqService,2).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.LinqService,2).sql index 3775b06230c6..20d69202e1ef 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.LinqService,2).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014 +-- SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,1).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,1).sql index 3775b06230c6..959ba23e96bf 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,1).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014 +-- SqlServer.2014 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,2).sql b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,2).sql index 3775b06230c6..abd4df8dc48d 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,2).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014 +-- SqlServer.2014 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2014.LinqService).sql index 005ab464f6b8..d97eae8ae009 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2014.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2014 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2014.LinqService).sql index 005ab464f6b8..411fea8053f5 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2014.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2014 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2014.LinqService).sql index 83820413684c..9a37c3e486b7 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2014.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2014 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2014 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2014.LinqService).sql index 83820413684c..bfb8afc15054 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2014.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2014 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2014 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..0891ca04bf7b --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..c3b8ada49fd3 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..c3b8ada49fd3 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..01685956ff16 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..27d94dda63f4 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2014.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..27d94dda63f4 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2014.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2014.LinqService).sql new file mode 100644 index 000000000000..72fb5cadc604 --- /dev/null +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2014.LinqService).sql @@ -0,0 +1,106 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2014.LinqService).sql index 21dab20b0e77..5474efe6258b 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2014.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql index f63f6ba79843..b9b085b3b52c 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2014 SELECT diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql index 2db0084a72da..6577dd6b5c79 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql index 2db0084a72da..9f2e78a2a0e4 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2014.LinqService).sql index 49b5588ceb53..ca2f4d5b6ae5 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2014.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2014 SELECT diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql index 2db0084a72da..0ae9c9973bfe 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.LinqService).sql index 2db0084a72da..e2143d5eb50d 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql index 2db0084a72da..3582ed28411f 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql index 2db0084a72da..07a799473ea4 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.LinqService).sql index 2db0084a72da..efa0227863ab 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql index 2db0084a72da..801f0e1e6bdd 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql index f63f6ba79843..b9b085b3b52c 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2014 SELECT diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql index 2db0084a72da..6577dd6b5c79 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql index 2db0084a72da..9f2e78a2a0e4 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2014.LinqService).sql index 49b5588ceb53..ca2f4d5b6ae5 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2014.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2014 SELECT diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql index 2db0084a72da..0ae9c9973bfe 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.LinqService).sql index 2db0084a72da..e2143d5eb50d 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql index 2db0084a72da..3582ed28411f 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql index 2db0084a72da..07a799473ea4 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.LinqService).sql index 2db0084a72da..efa0227863ab 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql index 2db0084a72da..801f0e1e6bdd 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql index ff3693ac4a05..98e03e84064d 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2014 SELECT diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql index 774363a5b8d2..89b43409299d 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql index 774363a5b8d2..87792ad73e19 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql index 774363a5b8d2..a7b7e9963f27 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql index 774363a5b8d2..8d9488885cf4 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql index 774363a5b8d2..0f607f8e681a 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.LinqService).sql index 774363a5b8d2..1544e14f293e 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2014.LinqService).sql index ff3693ac4a05..52301464c415 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2014.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2014 SELECT diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql index ff3693ac4a05..5a6336d99435 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2014.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2014 SELECT diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql index 774363a5b8d2..215ac4d100eb 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2014.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql index 774363a5b8d2..ed98af1ba93b 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql index 774363a5b8d2..a02744824e9c 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2014.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql index 774363a5b8d2..862326e8fc85 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql index 774363a5b8d2..27214d3a1e3b 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.LinqService).sql index 774363a5b8d2..22935765fd61 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2014.LinqService).sql b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2014.LinqService).sql index ff3693ac4a05..e5e8b7dcb305 100644 --- a/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2014.LinqService).sql +++ b/SqlServer.2014.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2014.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2014 SELECT diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..1e91e90bac6f --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..213c961a57e6 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..4c97f5244ee5 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..183c7e2003f7 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..4c97f5244ee5 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..183c7e2003f7 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..00c07e98ff30 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..26badd122ebf --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2014.MS.LinqService).sql index b15a4aa3b5ed..12336f598709 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2014.MS.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..16bbf062513e --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..97a1b767bf10 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..97a1b767bf10 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..3973a3b2a50f --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..3973a3b2a50f --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..7e7416f38189 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..095d40593809 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..9498fd73f991 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..41e348813dfa --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..41e348813dfa --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..5184582ea69f --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..5184582ea69f --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..ab7a368ca192 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..ab7a368ca192 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2014.MS.LinqService).sql index 81cc0e299aad..af4e82d1c3cc 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2014.MS.LinqService).sql @@ -1,163 +1,15 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2014.MS.LinqService).sql index 81cc0e299aad..9282d168c537 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2014.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2014.MS.LinqService).sql index 81cc0e299aad..31071ba4b3bd 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2014.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2014.MS.LinqService).sql index 81cc0e299aad..31071ba4b3bd 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2014.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2014.MS.LinqService).sql index 81cc0e299aad..9282d168c537 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2014.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2014.MS.LinqService).sql index 81cc0e299aad..c1221f842a11 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2014.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2014.MS.LinqService).sql index 81cc0e299aad..557be65a9da9 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2014.MS.LinqService).sql @@ -1,163 +1,12 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2014.MS.LinqService).sql index 81cc0e299aad..10971d62b442 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2014.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2014.MS.LinqService).sql index 81cc0e299aad..10971d62b442 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2014.MS.LinqService).sql @@ -1,163 +1,13 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..cdc21110e91c --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2014.MS.LinqService).sql index 7cccac2745dc..40a45f165621 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2014.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2014.MS.LinqService).sql index b6f10fa27c68..9a5e441bcddf 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2014.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..4e708477a821 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..7ad794d3f788 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..3fd324c06acc --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2014.MS.LinqService).sql index d0c9ebd32bf1..70620a1eaa38 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2014.MS.LinqService).sql @@ -1,47 +1,11 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NOT NULL) - DROP TABLE [DynamicParent] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2014.MS.LinqService).sql index 1f57f679b7f8..c5ec3115a07a 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2014.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2014.MS SqlServer.2014 (asynchronously) diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2014.MS.LinqService).sql index dafbff7875ce..bd8e897de3d4 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2014.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2014.MS SqlServer.2014 (asynchronously) diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..0a0da2021691 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..1fbacadb95ad --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..99c31660bc29 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..4a53e4a40b07 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..8e5a1d55624c --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.MS.LinqService,False).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.MS.LinqService,False).sql new file mode 100644 index 000000000000..017ed5211491 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.MS.LinqService,True).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.MS.LinqService,True).sql new file mode 100644 index 000000000000..017ed5211491 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2014.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.MS.LinqService,False).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.MS.LinqService,False).sql new file mode 100644 index 000000000000..017ed5211491 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.MS.LinqService,True).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.MS.LinqService,True).sql new file mode 100644 index 000000000000..017ed5211491 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2014.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2014.MS.LinqService).sql index bf5f680122c7..e56000a1f8b6 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2014.MS.LinqService).sql @@ -1,77 +1,13 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NOT NULL) - DROP TABLE [TakeSkipClass] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.MS.LinqService,False).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.MS.LinqService,False).sql index 88dfa1a83dde..c6121ff3d11d 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.MS.LinqService,False).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.MS.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.MS.LinqService,True).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.MS.LinqService,True).sql index 9a51af30892b..dfedc0e2d31d 100644 --- a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.MS.LinqService,True).sql +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2014.MS.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.MS.LinqService,False).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.MS.LinqService,False).sql new file mode 100644 index 000000000000..27f66f5a3f17 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.MS.LinqService,True).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.MS.LinqService,True).sql new file mode 100644 index 000000000000..27f66f5a3f17 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2014.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.MS.LinqService,False).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.MS.LinqService,False).sql new file mode 100644 index 000000000000..dd174f314af3 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.MS.LinqService,True).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.MS.LinqService,True).sql new file mode 100644 index 000000000000..acb22b05974a --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2014.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.MS.LinqService,False).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.MS.LinqService,False).sql new file mode 100644 index 000000000000..b746ce9b370e --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.MS.LinqService,True).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.MS.LinqService,True).sql new file mode 100644 index 000000000000..7046169e3d0b --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2014.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.MS.LinqService,False).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.MS.LinqService,False).sql new file mode 100644 index 000000000000..7da33f7f974c --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.MS.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.MS.LinqService,True).sql b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.MS.LinqService,True).sql new file mode 100644 index 000000000000..5d873a062f57 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2014.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,False,False).sql b/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,False,False).sql index 5b6c57df1211..9ffd3349ea39 100644 --- a/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,False,False).sql +++ b/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,False,False).sql @@ -4,3 +4,20 @@ IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,False,True).sql b/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,False,True).sql index db9f308b6e33..ef72a8c28e97 100644 --- a/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,False,True).sql +++ b/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,False,True).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,True,False).sql b/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,True,False).sql index 8979ab24ccb5..44ca07dcb5ba 100644 --- a/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,True,False).sql +++ b/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,True,False).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +CREATE TABLE [TestDataMS]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,True,True).sql b/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,True,True).sql index d05a05e8c7db..1656eec5dcf9 100644 --- a/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,True,True).sql +++ b/SqlServer.2014.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2014.MS.LinqService,False,True,True).sql @@ -20,3 +20,20 @@ BeforeExecute IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +CREATE TABLE [TestDataMS].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[Issue681Table2]', N'U') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..3a5c5c106e28 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,35 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[TestTable]', N'U') IS NOT NULL) + DROP TABLE [TestTable] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2014.MS.LinqService).sql index dc7b23c221c5..bde4df6b4b9a 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2014.MS.LinqService).sql @@ -1,4 +1,31 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 SELECT @@ -7,3 +34,9 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NOT NULL) + DROP TABLE [TempTable] + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..a800bbe49fa3 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.MS.LinqService,100).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.MS.LinqService,100).sql index 53eea3e49b06..7ed8fa5a328b 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.MS.LinqService,100).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.MS.LinqService,100).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.MS.LinqService,200).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.MS.LinqService,200).sql index 53eea3e49b06..7ed8fa5a328b 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.MS.LinqService,200).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2014.MS.LinqService,200).sql @@ -10,3 +10,22 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) + DROP TABLE [TableWithData] + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,100).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,100).sql index b0327d6df2d9..eb8a23845f5f 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,100).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,200).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,200).sql index b0327d6df2d9..eb8a23845f5f 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,200).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.MS.LinqService,100).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.MS.LinqService,100).sql index 53eea3e49b06..8862c38922e3 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.MS.LinqService,100).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.MS.LinqService,200).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.MS.LinqService,200).sql index 53eea3e49b06..0327725a443a 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.MS.LinqService,200).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2014.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,100).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,100).sql index b0327d6df2d9..5712786b4cbc 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,100).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,200).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,200).sql index b0327d6df2d9..4b32d059c272 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,200).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.MS.LinqService,100).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.MS.LinqService,100).sql index 0b3b343d0261..2327964de3ed 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.MS.LinqService,100).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.MS.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.MS.LinqService,200).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.MS.LinqService,200).sql index 0b3b343d0261..dcac1078bcc8 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.MS.LinqService,200).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2014.MS.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.MS.LinqService,100).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.MS.LinqService,100).sql index 53eea3e49b06..5f5400fc2920 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.MS.LinqService,100).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.MS.LinqService,200).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.MS.LinqService,200).sql index 53eea3e49b06..5f5400fc2920 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.MS.LinqService,200).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2014.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,100).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,100).sql index b0327d6df2d9..fc9c97d266f4 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,100).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,200).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,200).sql index b0327d6df2d9..fc9c97d266f4 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,200).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2014.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..3743bd144576 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..4a7bf0a0f0ba --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..4a7bf0a0f0ba --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2014.MS.LinqService).sql index 22528781dc8b..417b4e2a7d9c 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2014.MS.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,33 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2014.MS.LinqService).sql index 287a9706c7fd..380a3ff70c01 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2014.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..23259f8f0b91 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,151 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[xxPatient]', N'U') IS NOT NULL) + DROP TABLE [xxPatient] + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2014.MS.LinqService).sql index 287a9706c7fd..40f363f00f63 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2014.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2014.MS.LinqService).sql index 287a9706c7fd..280343628f77 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2014.MS.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2014.MS.LinqService).sql index 78cbe16018b2..8aa925ffd978 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2014.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2014.MS.LinqService).sql index 78cbe16018b2..8aa925ffd978 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2014.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2014.MS.LinqService).sql index d2ebfa370444..c71e1dba9949 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2014.MS.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,1).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,1).sql index 0c11b2a57639..a4199d8f4ee9 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,1).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,2).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,2).sql index 0c11b2a57639..6745a97148ef 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,2).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,1).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,1).sql index 0c11b2a57639..eddf76c4b01b 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,1).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,2).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,2).sql index 0c11b2a57639..1243c728fafe 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,2).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.MS.LinqService,100).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.MS.LinqService,100).sql index d08405df4584..0ca833403df6 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.MS.LinqService,100).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.MS.LinqService,200).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.MS.LinqService,200).sql index 16b32d4f9b78..8c0fc0971308 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.MS.LinqService,200).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2014.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.MS.LinqService,100).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.MS.LinqService,100).sql index be9fc3b9b941..60f55a647756 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.MS.LinqService,100).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.MS.LinqService,200).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.MS.LinqService,200).sql index 578f8d435dc2..65b5ca3cf79a 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.MS.LinqService,200).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2014.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,1).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,1).sql index 0c11b2a57639..8d2f63fe3bca 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,1).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,2).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,2).sql index 0c11b2a57639..0be379537e23 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,2).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2014.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,1).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,1).sql index 0c11b2a57639..eddf76c4b01b 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,1).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,1).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,2).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,2).sql index 0c11b2a57639..1243c728fafe 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,2).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2014.MS.LinqService,2).sql @@ -1,23 +1,26 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2014.MS.LinqService).sql index 4883b8a571ab..0a9ebc8ff15e 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2014.MS.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2014.MS.LinqService).sql index 4883b8a571ab..f597b54ab0f1 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2014.MS.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2014.MS.LinqService).sql index 326a78d552ba..8b73ed0fe6bd 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2014.MS.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2014.MS.LinqService).sql index 326a78d552ba..d1b557d63b1a 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2014.MS.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2014.MS SqlServer.2014 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..de0d798896f3 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..68da85acf36d --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..68da85acf36d --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..4b37a5431e68 --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..f6d32a86723c --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..f6d32a86723c --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2014.MS.LinqService).sql new file mode 100644 index 000000000000..75cadddf029e --- /dev/null +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2014.MS.LinqService).sql @@ -0,0 +1,106 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +IF (OBJECT_ID(N'[xxPerson]', N'U') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2014.MS.LinqService).sql index 12bf13fff7f8..607c28ce003d 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2014.MS.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql index 6171b713140d..18a9360a8683 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 SELECT diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..1ee8d65f90a4 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..5d376778d1a1 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql index d283f7cc78e7..a359deb58930 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 SELECT diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..7cca3c528acf 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..322b046d1af2 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..ce7de1b798c7 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..9b11ccb1f436 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..120e7c12b733 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..fef2e80b4443 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql index 6171b713140d..18a9360a8683 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 SELECT diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..1ee8d65f90a4 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,20 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..5d376778d1a1 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,22 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql index d283f7cc78e7..a359deb58930 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 SELECT diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..7cca3c528acf 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..322b046d1af2 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..ce7de1b798c7 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,18 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..9b11ccb1f436 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,16 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..120e7c12b733 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,15 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql index 6444c56319b7..fef2e80b4443 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2014.MS.LinqService).sql @@ -1,442 +1,17 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NOT NULL) - DROP TABLE [DestinationTable] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql index 59881740688b..529b3a10d0f8 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 SELECT diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql index e1a7e715b964..626eec2f143b 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql index e1a7e715b964..f0a0976db8f4 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql @@ -1,221 +1,18 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql index e1a7e715b964..bf6ac46a79d0 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql index e1a7e715b964..b4e873812930 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql index e1a7e715b964..cad9a8d6a88a 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.MS.LinqService).sql index e1a7e715b964..24f93a5cff36 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.MS.LinqService).sql @@ -1,221 +1,13 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2014.MS.LinqService).sql index 59881740688b..8d75c290904f 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2014.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 SELECT diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql index 59881740688b..8018430f9569 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 SELECT diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql index e1a7e715b964..75431c96d4ce 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql index e1a7e715b964..b65cc8a9c3ab 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql @@ -1,221 +1,19 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql index e1a7e715b964..da98257e24b0 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2014.MS.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql index e1a7e715b964..55f1acbc38f1 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2014.MS.LinqService).sql @@ -1,221 +1,15 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql index e1a7e715b964..669c9acf5bfd 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2014.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.MS.LinqService).sql index e1a7e715b964..7facc2221974 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2014.MS.LinqService).sql @@ -1,221 +1,14 @@ BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2014.MS SqlServer.2014 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NOT NULL) - DROP TABLE [TableWithData] +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2014.MS.LinqService).sql b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2014.MS.LinqService).sql index 59881740688b..5e5649ef4ca7 100644 --- a/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2014.MS.LinqService).sql +++ b/SqlServer.2014.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2014.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2014.MS SqlServer.2014 SELECT diff --git a/SqlServer.2014.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2014.MS).sql b/SqlServer.2014.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2014.MS).sql new file mode 100644 index 000000000000..c6217e27f12f --- /dev/null +++ b/SqlServer.2014.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2014.MS).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2014.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2014.MS).sql b/SqlServer.2014.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2014.MS).sql new file mode 100644 index 000000000000..4c97f5244ee5 --- /dev/null +++ b/SqlServer.2014.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2014.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2014.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2014.MS).sql b/SqlServer.2014.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2014.MS).sql new file mode 100644 index 000000000000..4c97f5244ee5 --- /dev/null +++ b/SqlServer.2014.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2014.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2014.MS SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2014/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2014).sql b/SqlServer.2014/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2014).sql new file mode 100644 index 000000000000..2a05fd1fc1ca --- /dev/null +++ b/SqlServer.2014/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2014).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2014/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2014).sql b/SqlServer.2014/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2014).sql new file mode 100644 index 000000000000..c62a7b63e120 --- /dev/null +++ b/SqlServer.2014/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2014).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2014/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2014).sql b/SqlServer.2014/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2014).sql new file mode 100644 index 000000000000..c62a7b63e120 --- /dev/null +++ b/SqlServer.2014/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2014).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2014 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From c03ab12b9f2c032584f8c7f6535611bd068bba10 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:32:34 +0000 Subject: [PATCH 07/40] [Windows / SQL Server 2016] baselines --- ....All4Async(SqlServer.2016.LinqService).sql | 13 + ...upBy2Async(SqlServer.2016.LinqService).sql | 30 ++ ...rable1Test(SqlServer.2016.LinqService).sql | 9 + ...rable2Test(SqlServer.2016.LinqService).sql | 11 + ...eCast1Test(SqlServer.2016.LinqService).sql | 9 + ...eCast2Test(SqlServer.2016.LinqService).sql | 11 + ...sAsyncTest(SqlServer.2016.LinqService).sql | 13 + ...tAsyncTest(SqlServer.2016.LinqService).sql | 14 + ...keSkipTest(SqlServer.2016.LinqService).sql | 16 + ...tOrDefault(SqlServer.2016.LinqService).sql | 19 + ...pAsyncTest(SqlServer.2016.LinqService).sql | 21 + ...tAsyncTest(SqlServer.2016.LinqService).sql | 21 + ...yTestAsync(SqlServer.2016.LinqService).sql | 30 ++ ...TestAsync2(SqlServer.2016.LinqService).sql | 30 ++ ...AsyncdTest(SqlServer.2016.LinqService).sql | 15 + ...Test3Async(SqlServer.2016.LinqService).sql | 26 + ...sTestAsync(SqlServer.2016.LinqService).sql | 26 + ...tTestAsync(SqlServer.2016.LinqService).sql | 24 + ...TestAsync2(SqlServer.2016.LinqService).sql | 24 + ...TestAsync1(SqlServer.2016.LinqService).sql | 26 + ...TestAsync2(SqlServer.2016.LinqService).sql | 26 + ...xTestAsync(SqlServer.2016.LinqService).sql | 24 + ...TestAsync2(SqlServer.2016.LinqService).sql | 24 + ...icateAsync(SqlServer.2016.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2016.LinqService).sql | 169 +------ ...icateAsync(SqlServer.2016.LinqService).sql | 170 +------ ...icateAsync(SqlServer.2016.LinqService).sql | 170 +------ ...icateAsync(SqlServer.2016.LinqService).sql | 169 +------ ...ectorAsync(SqlServer.2016.LinqService).sql | 169 +------ ...ectorAsync(SqlServer.2016.LinqService).sql | 169 +------ ...icateAsync(SqlServer.2016.LinqService).sql | 170 +------ ...icateAsync(SqlServer.2016.LinqService).sql | 170 +------ ...ncat1Async(SqlServer.2016.LinqService).sql | 19 + ...ementAsync(SqlServer.2016.LinqService).sql | 99 ++++ ...teredAsync(SqlServer.2016.LinqService).sql | 84 ++++ ...ount1Async(SqlServer.2016.LinqService).sql | 8 + ...ount2Async(SqlServer.2016.LinqService).sql | 10 + ...yMax1Async(SqlServer.2016.LinqService).sql | 17 + ....Issue4602(SqlServer.2016.LinqService).sql | 50 +- ...4057_Async(SqlServer.2016.LinqService).sql | 29 ++ ...ransaction(SqlServer.2016.LinqService).sql | 29 ++ ...ssionAsync(SqlServer.2016.LinqService).sql | 25 + ...Cast1Async(SqlServer.2016.LinqService).sql | 11 + ...est18Async(SqlServer.2016.LinqService).sql | 14 + ...eter1Async(SqlServer.2016.LinqService).sql | 6 + ...ue3132Test(SqlServer.2016.LinqService).sql | 213 ++++++++ ...sync(SqlServer.2016.LinqService,False).sql | 16 + ...Async(SqlServer.2016.LinqService,True).sql | 16 + ...sync(SqlServer.2016.LinqService,False).sql | 16 + ...Async(SqlServer.2016.LinqService,True).sql | 16 + ...Skip1Async(SqlServer.2016.LinqService).sql | 84 +--- ...sync(SqlServer.2016.LinqService,False).sql | 18 + ...Async(SqlServer.2016.LinqService,True).sql | 22 + ...sync(SqlServer.2016.LinqService,False).sql | 11 + ...Async(SqlServer.2016.LinqService,True).sql | 11 + ...sync(SqlServer.2016.LinqService,False).sql | 11 + ...Async(SqlServer.2016.LinqService,True).sql | 13 + ...sync(SqlServer.2016.LinqService,False).sql | 11 + ...Async(SqlServer.2016.LinqService,True).sql | 13 + ...sync(SqlServer.2016.LinqService,False).sql | 9 + ...Async(SqlServer.2016.LinqService,True).sql | 11 + ...er.2016.LinqService,False,False,False).sql | 16 + ...ver.2016.LinqService,False,False,True).sql | 16 + ...ver.2016.LinqService,False,True,False).sql | 16 + ...rver.2016.LinqService,False,True,True).sql | 16 + ...able1Async(SqlServer.2016.LinqService).sql | 34 ++ ...TableAsync(SqlServer.2016.LinqService).sql | 31 ++ ...eNameAsync(SqlServer.2016.LinqService).sql | 89 ++++ ...ncTest(SqlServer.2016.LinqService,100).sql | 18 + ...ncTest(SqlServer.2016.LinqService,200).sql | 18 + ...Record(SqlServer.2016.LinqService,100).sql | 13 + ...Record(SqlServer.2016.LinqService,200).sql | 13 + ...ncTest(SqlServer.2016.LinqService,100).sql | 15 + ...ncTest(SqlServer.2016.LinqService,200).sql | 15 + ...Record(SqlServer.2016.LinqService,100).sql | 15 + ...Record(SqlServer.2016.LinqService,200).sql | 15 + ...ncTest(SqlServer.2016.LinqService,100).sql | 21 + ...ncTest(SqlServer.2016.LinqService,200).sql | 21 + ...ncTest(SqlServer.2016.LinqService,100).sql | 12 + ...ncTest(SqlServer.2016.LinqService,200).sql | 12 + ...Record(SqlServer.2016.LinqService,100).sql | 12 + ...Record(SqlServer.2016.LinqService,200).sql | 12 + ...sert2Async(SqlServer.2016.LinqService).sql | 46 ++ ...sert3Async(SqlServer.2016.LinqService).sql | 48 ++ ...sert4Async(SqlServer.2016.LinqService).sql | 48 ++ ...eNameAsync(SqlServer.2016.LinqService).sql | 69 +++ ...lace1Async(SqlServer.2016.LinqService).sql | 97 ++++ ...eNameAsync(SqlServer.2016.LinqService).sql | 149 ++++++ ...date3Async(SqlServer.2016.LinqService).sql | 97 ++++ ...ate3xAsync(SqlServer.2016.LinqService).sql | 103 ++++ ...tity1Async(SqlServer.2016.LinqService).sql | 14 + ...tity2Async(SqlServer.2016.LinqService).sql | 14 + ...tity4Async(SqlServer.2016.LinqService).sql | 32 ++ ...syncTest(SqlServer.2016.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2016.LinqService,2).sql | 41 +- ...syncTest(SqlServer.2016.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2016.LinqService,2).sql | 41 +- ...tAsync(SqlServer.2016.LinqService,100).sql | 24 + ...tAsync(SqlServer.2016.LinqService,200).sql | 24 + ...Record(SqlServer.2016.LinqService,100).sql | 24 + ...Record(SqlServer.2016.LinqService,200).sql | 24 + ...syncTest(SqlServer.2016.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2016.LinqService,2).sql | 41 +- ...syncTest(SqlServer.2016.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2016.LinqService,2).sql | 41 +- ...tFullAsync(SqlServer.2016.LinqService).sql | 54 +++ ...ctionAsync(SqlServer.2016.LinqService).sql | 53 ++ ...mQueryAsyn(SqlServer.2016.LinqService).sql | 40 ++ ...mTableAsyn(SqlServer.2016.LinqService).sql | 38 ++ ...ate12Async(SqlServer.2016.LinqService).sql | 13 + ...date1Async(SqlServer.2016.LinqService).sql | 54 +++ ...date2Async(SqlServer.2016.LinqService).sql | 54 +++ ...date4Async(SqlServer.2016.LinqService).sql | 55 +++ ...tion1Async(SqlServer.2016.LinqService).sql | 41 ++ ...n1AsyncOld(SqlServer.2016.LinqService).sql | 41 ++ ...eNameAsync(SqlServer.2016.LinqService).sql | 105 ++++ ...plex1Async(SqlServer.2016.LinqService).sql | 55 +++ ...oTestAsync(SqlServer.2016.LinqService).sql | 23 + ...tTestAsync(SqlServer.2016.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2016.LinqService).sql | 456 +----------------- ...oTestAsync(SqlServer.2016.LinqService).sql | 23 + ...tTestAsync(SqlServer.2016.LinqService).sql | 451 +---------------- ...nateUpdate(SqlServer.2016.LinqService).sql | 450 +---------------- ...ngleRecord(SqlServer.2016.LinqService).sql | 452 +---------------- ...WithoutOld(SqlServer.2016.LinqService).sql | 450 +---------------- ...nateUpdate(SqlServer.2016.LinqService).sql | 449 +---------------- ...ngleRecord(SqlServer.2016.LinqService).sql | 451 +---------------- ...oTestAsync(SqlServer.2016.LinqService).sql | 23 + ...tTestAsync(SqlServer.2016.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2016.LinqService).sql | 456 +----------------- ...oTestAsync(SqlServer.2016.LinqService).sql | 23 + ...tTestAsync(SqlServer.2016.LinqService).sql | 451 +---------------- ...nateUpdate(SqlServer.2016.LinqService).sql | 450 +---------------- ...ngleRecord(SqlServer.2016.LinqService).sql | 452 +---------------- ...WithoutOld(SqlServer.2016.LinqService).sql | 450 +---------------- ...nateUpdate(SqlServer.2016.LinqService).sql | 449 +---------------- ...ngleRecord(SqlServer.2016.LinqService).sql | 451 +---------------- ...oTestAsync(SqlServer.2016.LinqService).sql | 21 + ...tTestAsync(SqlServer.2016.LinqService).sql | 233 +-------- ...ngleRecord(SqlServer.2016.LinqService).sql | 233 +-------- ...tTestAsync(SqlServer.2016.LinqService).sql | 229 +-------- ...ngleRecord(SqlServer.2016.LinqService).sql | 229 +-------- ...WithoutOld(SqlServer.2016.LinqService).sql | 228 +-------- ...ngleRecord(SqlServer.2016.LinqService).sql | 228 +-------- ...tIntoAsync(SqlServer.2016.LinqService).sql | 21 + ...oTestAsync(SqlServer.2016.LinqService).sql | 22 + ...tTestAsync(SqlServer.2016.LinqService).sql | 234 +-------- ...ngleRecord(SqlServer.2016.LinqService).sql | 234 +-------- ...tTestAsync(SqlServer.2016.LinqService).sql | 230 +-------- ...ngleRecord(SqlServer.2016.LinqService).sql | 230 +-------- ...WithoutOld(SqlServer.2016.LinqService).sql | 229 +-------- ...ngleRecord(SqlServer.2016.LinqService).sql | 229 +-------- ...tIntoAsync(SqlServer.2016.LinqService).sql | 22 + ...l4Async(SqlServer.2016.MS.LinqService).sql | 13 + ...y2Async(SqlServer.2016.MS.LinqService).sql | 30 ++ ...le1Test(SqlServer.2016.MS.LinqService).sql | 9 + ...le2Test(SqlServer.2016.MS.LinqService).sql | 11 + ...st1Test(SqlServer.2016.MS.LinqService).sql | 9 + ...st2Test(SqlServer.2016.MS.LinqService).sql | 11 + ...yncTest(SqlServer.2016.MS.LinqService).sql | 13 + ...yncTest(SqlServer.2016.MS.LinqService).sql | 14 + ...kipTest(SqlServer.2016.MS.LinqService).sql | 16 + ...Default(SqlServer.2016.MS.LinqService).sql | 19 + ...yncTest(SqlServer.2016.MS.LinqService).sql | 21 + ...yncTest(SqlServer.2016.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2016.MS.LinqService).sql | 30 ++ ...tAsync2(SqlServer.2016.MS.LinqService).sql | 30 ++ ...ncdTest(SqlServer.2016.MS.LinqService).sql | 15 + ...t3Async(SqlServer.2016.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2016.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2016.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2016.MS.LinqService).sql | 24 + ...tAsync1(SqlServer.2016.MS.LinqService).sql | 26 + ...tAsync2(SqlServer.2016.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2016.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2016.MS.LinqService).sql | 24 + ...teAsync(SqlServer.2016.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2016.MS.LinqService).sql | 169 +------ ...teAsync(SqlServer.2016.MS.LinqService).sql | 170 +------ ...teAsync(SqlServer.2016.MS.LinqService).sql | 170 +------ ...teAsync(SqlServer.2016.MS.LinqService).sql | 169 +------ ...orAsync(SqlServer.2016.MS.LinqService).sql | 169 +------ ...orAsync(SqlServer.2016.MS.LinqService).sql | 169 +------ ...teAsync(SqlServer.2016.MS.LinqService).sql | 170 +------ ...teAsync(SqlServer.2016.MS.LinqService).sql | 170 +------ ...t1Async(SqlServer.2016.MS.LinqService).sql | 19 + ...ntAsync(SqlServer.2016.MS.LinqService).sql | 99 ++++ ...edAsync(SqlServer.2016.MS.LinqService).sql | 84 ++++ ...t1Async(SqlServer.2016.MS.LinqService).sql | 8 + ...t2Async(SqlServer.2016.MS.LinqService).sql | 10 + ...x1Async(SqlServer.2016.MS.LinqService).sql | 17 + ...sue4602(SqlServer.2016.MS.LinqService).sql | 50 +- ...7_Async(SqlServer.2016.MS.LinqService).sql | 29 ++ ...saction(SqlServer.2016.MS.LinqService).sql | 29 ++ ...onAsync(SqlServer.2016.MS.LinqService).sql | 25 + ...t1Async(SqlServer.2016.MS.LinqService).sql | 11 + ...18Async(SqlServer.2016.MS.LinqService).sql | 14 + ...r1Async(SqlServer.2016.MS.LinqService).sql | 6 + ...132Test(SqlServer.2016.MS.LinqService).sql | 213 ++++++++ ...c(SqlServer.2016.MS.LinqService,False).sql | 16 + ...nc(SqlServer.2016.MS.LinqService,True).sql | 16 + ...c(SqlServer.2016.MS.LinqService,False).sql | 16 + ...nc(SqlServer.2016.MS.LinqService,True).sql | 16 + ...p1Async(SqlServer.2016.MS.LinqService).sql | 84 +--- ...c(SqlServer.2016.MS.LinqService,False).sql | 18 + ...nc(SqlServer.2016.MS.LinqService,True).sql | 22 + ...c(SqlServer.2016.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2016.MS.LinqService,True).sql | 11 + ...c(SqlServer.2016.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2016.MS.LinqService,True).sql | 13 + ...c(SqlServer.2016.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2016.MS.LinqService,True).sql | 13 + ...c(SqlServer.2016.MS.LinqService,False).sql | 9 + ...nc(SqlServer.2016.MS.LinqService,True).sql | 11 + ...2016.MS.LinqService,False,False,False).sql | 16 + ....2016.MS.LinqService,False,False,True).sql | 16 + ....2016.MS.LinqService,False,True,False).sql | 16 + ...r.2016.MS.LinqService,False,True,True).sql | 16 + ...e1Async(SqlServer.2016.MS.LinqService).sql | 34 ++ ...leAsync(SqlServer.2016.MS.LinqService).sql | 31 ++ ...meAsync(SqlServer.2016.MS.LinqService).sql | 89 ++++ ...est(SqlServer.2016.MS.LinqService,100).sql | 18 + ...est(SqlServer.2016.MS.LinqService,200).sql | 18 + ...ord(SqlServer.2016.MS.LinqService,100).sql | 13 + ...ord(SqlServer.2016.MS.LinqService,200).sql | 13 + ...est(SqlServer.2016.MS.LinqService,100).sql | 15 + ...est(SqlServer.2016.MS.LinqService,200).sql | 15 + ...ord(SqlServer.2016.MS.LinqService,100).sql | 15 + ...ord(SqlServer.2016.MS.LinqService,200).sql | 15 + ...est(SqlServer.2016.MS.LinqService,100).sql | 21 + ...est(SqlServer.2016.MS.LinqService,200).sql | 21 + ...est(SqlServer.2016.MS.LinqService,100).sql | 12 + ...est(SqlServer.2016.MS.LinqService,200).sql | 12 + ...ord(SqlServer.2016.MS.LinqService,100).sql | 12 + ...ord(SqlServer.2016.MS.LinqService,200).sql | 12 + ...t2Async(SqlServer.2016.MS.LinqService).sql | 46 ++ ...t3Async(SqlServer.2016.MS.LinqService).sql | 48 ++ ...t4Async(SqlServer.2016.MS.LinqService).sql | 48 ++ ...meAsync(SqlServer.2016.MS.LinqService).sql | 69 +++ ...e1Async(SqlServer.2016.MS.LinqService).sql | 97 ++++ ...meAsync(SqlServer.2016.MS.LinqService).sql | 149 ++++++ ...e3Async(SqlServer.2016.MS.LinqService).sql | 97 ++++ ...3xAsync(SqlServer.2016.MS.LinqService).sql | 103 ++++ ...y1Async(SqlServer.2016.MS.LinqService).sql | 14 + ...y2Async(SqlServer.2016.MS.LinqService).sql | 14 + ...y4Async(SqlServer.2016.MS.LinqService).sql | 32 ++ ...cTest(SqlServer.2016.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2016.MS.LinqService,2).sql | 41 +- ...cTest(SqlServer.2016.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2016.MS.LinqService,2).sql | 41 +- ...ync(SqlServer.2016.MS.LinqService,100).sql | 24 + ...ync(SqlServer.2016.MS.LinqService,200).sql | 24 + ...ord(SqlServer.2016.MS.LinqService,100).sql | 24 + ...ord(SqlServer.2016.MS.LinqService,200).sql | 24 + ...cTest(SqlServer.2016.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2016.MS.LinqService,2).sql | 41 +- ...cTest(SqlServer.2016.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2016.MS.LinqService,2).sql | 41 +- ...llAsync(SqlServer.2016.MS.LinqService).sql | 54 +++ ...onAsync(SqlServer.2016.MS.LinqService).sql | 53 ++ ...eryAsyn(SqlServer.2016.MS.LinqService).sql | 40 ++ ...bleAsyn(SqlServer.2016.MS.LinqService).sql | 38 ++ ...12Async(SqlServer.2016.MS.LinqService).sql | 13 + ...e1Async(SqlServer.2016.MS.LinqService).sql | 54 +++ ...e2Async(SqlServer.2016.MS.LinqService).sql | 54 +++ ...e4Async(SqlServer.2016.MS.LinqService).sql | 55 +++ ...n1Async(SqlServer.2016.MS.LinqService).sql | 41 ++ ...syncOld(SqlServer.2016.MS.LinqService).sql | 41 ++ ...meAsync(SqlServer.2016.MS.LinqService).sql | 105 ++++ ...x1Async(SqlServer.2016.MS.LinqService).sql | 55 +++ ...stAsync(SqlServer.2016.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2016.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2016.MS.LinqService).sql | 456 +----------------- ...stAsync(SqlServer.2016.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2016.MS.LinqService).sql | 451 +---------------- ...eUpdate(SqlServer.2016.MS.LinqService).sql | 450 +---------------- ...eRecord(SqlServer.2016.MS.LinqService).sql | 452 +---------------- ...houtOld(SqlServer.2016.MS.LinqService).sql | 450 +---------------- ...eUpdate(SqlServer.2016.MS.LinqService).sql | 449 +---------------- ...eRecord(SqlServer.2016.MS.LinqService).sql | 451 +---------------- ...stAsync(SqlServer.2016.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2016.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2016.MS.LinqService).sql | 456 +----------------- ...stAsync(SqlServer.2016.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2016.MS.LinqService).sql | 451 +---------------- ...eUpdate(SqlServer.2016.MS.LinqService).sql | 450 +---------------- ...eRecord(SqlServer.2016.MS.LinqService).sql | 452 +---------------- ...houtOld(SqlServer.2016.MS.LinqService).sql | 450 +---------------- ...eUpdate(SqlServer.2016.MS.LinqService).sql | 449 +---------------- ...eRecord(SqlServer.2016.MS.LinqService).sql | 451 +---------------- ...stAsync(SqlServer.2016.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2016.MS.LinqService).sql | 233 +-------- ...eRecord(SqlServer.2016.MS.LinqService).sql | 233 +-------- ...stAsync(SqlServer.2016.MS.LinqService).sql | 229 +-------- ...eRecord(SqlServer.2016.MS.LinqService).sql | 229 +-------- ...houtOld(SqlServer.2016.MS.LinqService).sql | 228 +-------- ...eRecord(SqlServer.2016.MS.LinqService).sql | 228 +-------- ...toAsync(SqlServer.2016.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2016.MS.LinqService).sql | 22 + ...stAsync(SqlServer.2016.MS.LinqService).sql | 234 +-------- ...eRecord(SqlServer.2016.MS.LinqService).sql | 234 +-------- ...stAsync(SqlServer.2016.MS.LinqService).sql | 230 +-------- ...eRecord(SqlServer.2016.MS.LinqService).sql | 230 +-------- ...houtOld(SqlServer.2016.MS.LinqService).sql | 229 +-------- ...eRecord(SqlServer.2016.MS.LinqService).sql | 229 +-------- ...toAsync(SqlServer.2016.MS.LinqService).sql | 22 + ...inq.AsyncTests.Test(SqlServer.2016.MS).sql | 18 + ...nq.AsyncTests.Test1(SqlServer.2016.MS).sql | 9 + ...ncTests.TestForEach(SqlServer.2016.MS).sql | 9 + ...s.Linq.AsyncTests.Test(SqlServer.2016).sql | 18 + ....Linq.AsyncTests.Test1(SqlServer.2016).sql | 9 + ...AsyncTests.TestForEach(SqlServer.2016).sql | 9 + 312 files changed, 7986 insertions(+), 22538 deletions(-) create mode 100644 SqlServer.2016.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.LinqService,False).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.LinqService,True).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.LinqService,False).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.LinqService,True).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.LinqService,False).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.LinqService,True).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.LinqService,False).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.LinqService,True).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.LinqService,False).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.LinqService,True).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.LinqService,False).sql create mode 100644 SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.LinqService,True).sql create mode 100644 SqlServer.2016.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2016.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.MS.LinqService,False).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.MS.LinqService,True).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.MS.LinqService,False).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.MS.LinqService,True).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.MS.LinqService,False).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.MS.LinqService,True).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.MS.LinqService,False).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.MS.LinqService,True).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.MS.LinqService,False).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.MS.LinqService,True).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.MS.LinqService,False).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.MS.LinqService,True).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2016.MS.LinqService).sql create mode 100644 SqlServer.2016.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2016.MS).sql create mode 100644 SqlServer.2016.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2016.MS).sql create mode 100644 SqlServer.2016.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2016.MS).sql create mode 100644 SqlServer.2016/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2016).sql create mode 100644 SqlServer.2016/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2016).sql create mode 100644 SqlServer.2016/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2016).sql diff --git a/SqlServer.2016.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..328a0a8c396a --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.2016.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..e5e1bb05abdf --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..e5c8bc076d72 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2016.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..b0acd4ab02c5 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2016.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..e5c8bc076d72 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2016.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..b0acd4ab02c5 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2016.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..c427c864c460 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2016.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..ac4381d394cf --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2016.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2016.LinqService).sql index 5d29e399c605..6ae555620215 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2016.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..8c1b6919040b --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2016.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..fa8b1a1d7a61 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2016.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..fa8b1a1d7a61 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2016.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..31ad7102a9c1 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2016.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..31ad7102a9c1 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2016.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..a4bd93c6a8e6 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2016.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..08b511dc1a9d --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..8972075d779d --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2016.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..a43efca7f625 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2016.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..a43efca7f625 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2016.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..605da9d977b1 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2016.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..605da9d977b1 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2016.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..9e9e6f64dae0 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2016.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..9e9e6f64dae0 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2016.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2016.LinqService).sql index a5e57a05fbd7..cde3d6b18114 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2016.LinqService).sql @@ -1,161 +1,15 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2016.LinqService).sql index a5e57a05fbd7..8e2720b5559f 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2016.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2016.LinqService).sql index a5e57a05fbd7..e5100aaad4e9 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2016.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2016.LinqService).sql index a5e57a05fbd7..e5100aaad4e9 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2016.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2016.LinqService).sql index a5e57a05fbd7..8e2720b5559f 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2016.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2016.LinqService).sql index a5e57a05fbd7..22494792a829 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2016.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2016.LinqService).sql index a5e57a05fbd7..183c2ff2bb5a 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2016.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2016.LinqService).sql index a5e57a05fbd7..d14527dc134d 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2016.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2016.LinqService).sql index a5e57a05fbd7..d14527dc134d 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2016.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2016.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..7e8b3b006a21 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2016.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2016.LinqService).sql index d7c5d0da8587..741ab91f8ecf 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2016.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2016 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016 diff --git a/SqlServer.2016.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2016.LinqService).sql index 5a7a69637939..ec13bb4aee23 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2016.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2016 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016 diff --git a/SqlServer.2016.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..f8bb4bbaf9df --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..1a5a32cae779 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2016.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..8db27033efe4 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2016.LinqService).sql index 2e3ca366510c..7a3532a74828 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2016.LinqService).sql @@ -1,43 +1,11 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DynamicParent] +-- SqlServer.2016 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2016.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2016.LinqService).sql index 01620535f2fa..b5668251f7ce 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2016.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2016 (asynchronously) diff --git a/SqlServer.2016.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2016.LinqService).sql index 0aade9f4c2da..889292bdaab8 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2016.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2016 (asynchronously) diff --git a/SqlServer.2016.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..799807b3cf6a --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2016.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..ec3f3849d648 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2016.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..93608f73358e --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2016.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..70d0c2631e01 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2016.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..a21e7ad4d939 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2016.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.LinqService,False).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.LinqService,False).sql new file mode 100644 index 000000000000..90c31d6fb550 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.LinqService,True).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.LinqService,True).sql new file mode 100644 index 000000000000..90c31d6fb550 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.LinqService,False).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.LinqService,False).sql new file mode 100644 index 000000000000..90c31d6fb550 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.LinqService,True).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.LinqService,True).sql new file mode 100644 index 000000000000..90c31d6fb550 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2016.LinqService).sql index 8d3ee37f9333..8fc5971dcb6d 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2016.LinqService).sql @@ -1,75 +1,13 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SqlServer.2016 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.LinqService,False).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.LinqService,False).sql index 9b2096de1880..70f7f006905c 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.LinqService,False).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.LinqService,True).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.LinqService,True).sql index 284377d1ad55..3fa6f72f3d78 100644 --- a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.LinqService,True).sql +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.LinqService,False).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.LinqService,False).sql new file mode 100644 index 000000000000..b750f4773e82 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.LinqService,True).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.LinqService,True).sql new file mode 100644 index 000000000000..b750f4773e82 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.LinqService,False).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.LinqService,False).sql new file mode 100644 index 000000000000..36f53f1cceef --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.LinqService,True).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.LinqService,True).sql new file mode 100644 index 000000000000..2eaca9fef458 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.LinqService,False).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.LinqService,False).sql new file mode 100644 index 000000000000..a11d5114fbb6 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.LinqService,True).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.LinqService,True).sql new file mode 100644 index 000000000000..45705f997a74 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.LinqService,False).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.LinqService,False).sql new file mode 100644 index 000000000000..c9acfc55bb06 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.LinqService,True).sql b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.LinqService,True).sql new file mode 100644 index 000000000000..8800df19562c --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,False,False).sql b/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,False,False).sql index 25764d43c3bf..238cee6238dd 100644 --- a/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,False,False).sql +++ b/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2016 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,False,True).sql b/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,False,True).sql index bf5c8df99342..6cc0b2a90383 100644 --- a/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,False,True).sql +++ b/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,False,True).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2016 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,True,False).sql b/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,True,False).sql index 6289c5aa823a..a7cdd0a3abe7 100644 --- a/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,True,False).sql +++ b/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,True,False).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2016 (asynchronously) + +CREATE TABLE [TestData]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,True,True).sql b/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,True,True).sql index f5a86b4b6aa0..4ff02d36fc65 100644 --- a/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,True,True).sql +++ b/SqlServer.2016.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.LinqService,False,True,True).sql @@ -19,3 +19,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2016 (asynchronously) + +CREATE TABLE [TestData].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..1d994ee05f8a --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2016.LinqService).sql index a07921b78a23..1c5610296fa9 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2016.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2016 SELECT @@ -7,3 +33,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..9600599665db --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2016.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.LinqService,100).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.LinqService,100).sql index 1a2faf1e22c7..3317a982f1db 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.LinqService,100).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.LinqService,100).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.LinqService,200).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.LinqService,200).sql index 1a2faf1e22c7..3317a982f1db 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.LinqService,200).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.LinqService,200).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.LinqService,100).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.LinqService,100).sql index bd4e1eafb7d0..db40448dd708 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.LinqService,100).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.LinqService,200).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.LinqService,200).sql index bd4e1eafb7d0..db40448dd708 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.LinqService,200).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.LinqService,100).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.LinqService,100).sql index 1a2faf1e22c7..c606640f4051 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.LinqService,100).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.LinqService,200).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.LinqService,200).sql index 1a2faf1e22c7..7d13ff4612ee 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.LinqService,200).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,100).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,100).sql index bd4e1eafb7d0..5916e349e31c 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,100).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,200).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,200).sql index bd4e1eafb7d0..ae78058c7429 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,200).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.LinqService,100).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.LinqService,100).sql index 52dd40c75d89..cc986e95f8a1 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.LinqService,100).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2016 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.LinqService,200).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.LinqService,200).sql index 52dd40c75d89..415b83a1b676 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.LinqService,200).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2016 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.LinqService,100).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.LinqService,100).sql index 1a2faf1e22c7..6762497284d4 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.LinqService,100).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.LinqService,200).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.LinqService,200).sql index 1a2faf1e22c7..6762497284d4 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.LinqService,200).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,100).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,100).sql index bd4e1eafb7d0..02f355858e57 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,100).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,200).sql b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,200).sql index bd4e1eafb7d0..02f355858e57 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,200).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..41acedcd16d2 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..1f99da4a68e1 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..1f99da4a68e1 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2016.LinqService).sql index f8fa8ec14060..a45124cf13ac 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2016.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2016 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,32 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2016.LinqService).sql index 54c2eac98cc3..39bce4708792 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2016.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..61f18fbfefab --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2016.LinqService).sql @@ -0,0 +1,149 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2016.LinqService).sql index 54c2eac98cc3..a62435b6b665 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2016.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2016.LinqService).sql index 54c2eac98cc3..02b8b04eb550 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2016.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2016.LinqService).sql index 7a7a38622af3..6a58e6cadeac 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2016.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2016 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2016.LinqService).sql index 7a7a38622af3..6a58e6cadeac 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2016.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2016 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2016.LinqService).sql index 07063d64db0e..429f89171825 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2016.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2016 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2016 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.LinqService,1).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.LinqService,1).sql index 0a6f09256bfc..d1bdbdafb401 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.LinqService,1).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016 +-- SqlServer.2016 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.LinqService,2).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.LinqService,2).sql index 0a6f09256bfc..5a571c5ce486 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.LinqService,2).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016 +-- SqlServer.2016 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,1).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,1).sql index 0a6f09256bfc..4dee0b555f85 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,1).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016 +-- SqlServer.2016 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,2).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,2).sql index 0a6f09256bfc..f12071beb799 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,2).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016 +-- SqlServer.2016 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.LinqService,100).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.LinqService,100).sql index b43a0921bc9e..2a53b573bb1c 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.LinqService,100).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2016 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.LinqService,200).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.LinqService,200).sql index 5610a66866a4..ef8861b7a65d 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.LinqService,200).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2016 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.LinqService,100).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.LinqService,100).sql index 73049289be8e..94805d17c4c0 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.LinqService,100).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2016 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.LinqService,200).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.LinqService,200).sql index 21bf8b1c7b2e..91bdf10ec1b9 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.LinqService,200).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2016 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.LinqService,1).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.LinqService,1).sql index 0a6f09256bfc..03f1f8ac8701 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.LinqService,1).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016 +-- SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.LinqService,2).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.LinqService,2).sql index 0a6f09256bfc..2a20e6b49e26 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.LinqService,2).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016 +-- SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,1).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,1).sql index 0a6f09256bfc..4dee0b555f85 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,1).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016 +-- SqlServer.2016 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,2).sql b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,2).sql index 0a6f09256bfc..f12071beb799 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,2).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016 +-- SqlServer.2016 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2016.LinqService).sql index 5ce255603f5c..abd9359886b6 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2016.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2016 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2016.LinqService).sql index 5ce255603f5c..57842e99c92a 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2016.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2016 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2016.LinqService).sql index 7d5e0dbabf4b..02c63e23d13a 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2016.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2016 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2016 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2016.LinqService).sql index 7d5e0dbabf4b..4c27b0efc92e 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2016.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2016 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2016 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..d3f8dce29748 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..88fa5509afde --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..88fa5509afde --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..a10a3d47d7fd --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..493812769480 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2016.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..493812769480 --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2016.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2016.LinqService).sql new file mode 100644 index 000000000000..6e3b9a8df9df --- /dev/null +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2016.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2016.LinqService).sql index 868a33d5b6d6..efbe572ed8b0 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2016.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql index cc7ac5c17aa7..f00c474c1a2f 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2016 SELECT diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql index 2fce5a372166..4b236b546ea5 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql index 2fce5a372166..5e994f17e40c 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2016.LinqService).sql index 754246ac2b04..afb35c4ea6a9 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2016.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2016 SELECT diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql index 2fce5a372166..169e6ed5359c 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.LinqService).sql index 2fce5a372166..15e66acb5e0e 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql index 2fce5a372166..693152e8c134 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql index 2fce5a372166..d0147a4bfd55 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.LinqService).sql index 2fce5a372166..460b1192ee15 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql index 2fce5a372166..9867b8f65be2 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql index cc7ac5c17aa7..f00c474c1a2f 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2016 SELECT diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql index 2fce5a372166..4b236b546ea5 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql index 2fce5a372166..5e994f17e40c 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2016.LinqService).sql index 754246ac2b04..afb35c4ea6a9 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2016.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2016 SELECT diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql index 2fce5a372166..169e6ed5359c 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.LinqService).sql index 2fce5a372166..15e66acb5e0e 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql index 2fce5a372166..693152e8c134 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql index 2fce5a372166..d0147a4bfd55 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.LinqService).sql index 2fce5a372166..460b1192ee15 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql index 2fce5a372166..9867b8f65be2 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql index 15dc126890e9..b26233dfe2c0 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2016 SELECT diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql index 5c611f974b65..1e3371daf096 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql index 5c611f974b65..34bb51c2a0a5 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql index 5c611f974b65..3349ee82e235 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql index 5c611f974b65..05c425704417 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql index 5c611f974b65..75f55a905f34 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.LinqService).sql index 5c611f974b65..88c938faaa07 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2016.LinqService).sql index 15dc126890e9..dbf18a91721e 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2016.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2016 SELECT diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql index 15dc126890e9..aa68ee3dfd3f 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2016.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2016 SELECT diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql index 5c611f974b65..4f979d8dff60 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2016.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql index 5c611f974b65..01bb2e07629f 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql index 5c611f974b65..98dcca414ecf 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2016.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql index 5c611f974b65..97453c496556 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql index 5c611f974b65..bb07c9eb8b67 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.LinqService).sql index 5c611f974b65..b1db15bf2c5f 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2016.LinqService).sql b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2016.LinqService).sql index 15dc126890e9..98acd0dd37a6 100644 --- a/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2016.LinqService).sql +++ b/SqlServer.2016.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2016.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2016 SELECT diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..f5205b57d5b8 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..ff17fac40c69 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..e1d3241b9672 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..b54f1f4bd115 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..e1d3241b9672 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..b54f1f4bd115 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..0039352888b5 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..aa8dd6fd0fc9 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2016.MS.LinqService).sql index 3a012e302917..ef9d148688bb 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2016.MS.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..d391bef84249 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..6149fb3ef326 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..6149fb3ef326 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..445b244a32fd --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..445b244a32fd --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..9dfa108938b8 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..5d9d59ca3d7f --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..f7bfa6602825 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..287356e93797 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..287356e93797 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..ac54877d2c84 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..ac54877d2c84 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..262b5b39eea7 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..262b5b39eea7 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2016.MS.LinqService).sql index 9260e828042b..124912e96333 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2016.MS.LinqService).sql @@ -1,161 +1,15 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2016.MS.LinqService).sql index 9260e828042b..0c76be6ded35 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2016.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2016.MS.LinqService).sql index 9260e828042b..f1e4d2e5c9a0 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2016.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2016.MS.LinqService).sql index 9260e828042b..f1e4d2e5c9a0 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2016.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2016.MS.LinqService).sql index 9260e828042b..0c76be6ded35 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2016.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2016.MS.LinqService).sql index 9260e828042b..6f91ddc2c6a5 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2016.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2016.MS.LinqService).sql index 9260e828042b..75d19bf6f33b 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2016.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2016.MS.LinqService).sql index 9260e828042b..ec800040f96b 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2016.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2016.MS.LinqService).sql index 9260e828042b..ec800040f96b 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2016.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..62991f3e4c9b --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2016.MS.LinqService).sql index 88088db6788f..a15c2cbb9ea6 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2016.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2016.MS.LinqService).sql index c171cd6d5acf..4708d056621a 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2016.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..7cd5af2758d7 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..fe4b75ae7555 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..c45a75915892 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2016.MS.LinqService).sql index a2d24a44ae49..8f77874aaf53 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2016.MS.LinqService).sql @@ -1,43 +1,11 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DynamicParent] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2016.MS.LinqService).sql index f4630c7996f0..2ee0ca04b0c9 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2016.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2016.MS SqlServer.2016 (asynchronously) diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2016.MS.LinqService).sql index 7152d91d0c2a..a27721ca70b5 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2016.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2016.MS SqlServer.2016 (asynchronously) diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..e9960b5850db --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..47a9d9ef6868 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..6309b55d2b44 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..2c8f61411713 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..b3d1289a301c --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.MS.LinqService,False).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.MS.LinqService,False).sql new file mode 100644 index 000000000000..849a06ab6328 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.MS.LinqService,True).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.MS.LinqService,True).sql new file mode 100644 index 000000000000..849a06ab6328 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2016.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.MS.LinqService,False).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.MS.LinqService,False).sql new file mode 100644 index 000000000000..849a06ab6328 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.MS.LinqService,True).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.MS.LinqService,True).sql new file mode 100644 index 000000000000..849a06ab6328 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2016.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2016.MS.LinqService).sql index 5a12357cb2d3..cd2a8b235dfd 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2016.MS.LinqService).sql @@ -1,75 +1,13 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.MS.LinqService,False).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.MS.LinqService,False).sql index 53ffdc935d54..9b402d5e20bf 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.MS.LinqService,False).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.MS.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.MS.LinqService,True).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.MS.LinqService,True).sql index 1d4c74ecf32a..b5a4172b64ac 100644 --- a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.MS.LinqService,True).sql +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2016.MS.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.MS.LinqService,False).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.MS.LinqService,False).sql new file mode 100644 index 000000000000..e497c9e26fd9 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.MS.LinqService,True).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.MS.LinqService,True).sql new file mode 100644 index 000000000000..e497c9e26fd9 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2016.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.MS.LinqService,False).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.MS.LinqService,False).sql new file mode 100644 index 000000000000..282f77884c84 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.MS.LinqService,True).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.MS.LinqService,True).sql new file mode 100644 index 000000000000..babf458edfae --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2016.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.MS.LinqService,False).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.MS.LinqService,False).sql new file mode 100644 index 000000000000..a053dafdb266 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.MS.LinqService,True).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.MS.LinqService,True).sql new file mode 100644 index 000000000000..e4bd09ef3f30 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2016.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.MS.LinqService,False).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.MS.LinqService,False).sql new file mode 100644 index 000000000000..9e5294e461f3 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.MS.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.MS.LinqService,True).sql b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.MS.LinqService,True).sql new file mode 100644 index 000000000000..eadc4cd80ec2 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2016.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,False,False).sql b/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,False,False).sql index afbceb6f0027..b3e124d1ff19 100644 --- a/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,False,False).sql +++ b/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,False,True).sql b/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,False,True).sql index d5a6c9f9b7fd..194a83dd3fba 100644 --- a/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,False,True).sql +++ b/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,False,True).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,True,False).sql b/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,True,False).sql index 9fb61b319268..dc5020016674 100644 --- a/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,True,False).sql +++ b/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,True,False).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +CREATE TABLE [TestDataMS]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,True,True).sql b/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,True,True).sql index 7e4e3e667589..b67e8a5f6e8c 100644 --- a/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,True,True).sql +++ b/SqlServer.2016.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2016.MS.LinqService,False,True,True).sql @@ -19,3 +19,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +CREATE TABLE [TestDataMS].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..a2496d6a20d4 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2016.MS.LinqService).sql index 407ab09e9266..9fd7205d3498 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2016.MS.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 SELECT @@ -7,3 +33,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..39b8e4713e21 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.MS.LinqService,100).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.MS.LinqService,100).sql index a62ee0f9d1df..a9b06240bbac 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.MS.LinqService,100).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.MS.LinqService,100).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.MS.LinqService,200).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.MS.LinqService,200).sql index a62ee0f9d1df..a9b06240bbac 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.MS.LinqService,200).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2016.MS.LinqService,200).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,100).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,100).sql index 94f82be21fcc..cef4086cf4fe 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,100).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,200).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,200).sql index 94f82be21fcc..cef4086cf4fe 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,200).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.MS.LinqService,100).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.MS.LinqService,100).sql index a62ee0f9d1df..fd2428476196 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.MS.LinqService,100).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.MS.LinqService,200).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.MS.LinqService,200).sql index a62ee0f9d1df..f175acda8375 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.MS.LinqService,200).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2016.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,100).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,100).sql index 94f82be21fcc..e77604429c53 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,100).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,200).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,200).sql index 94f82be21fcc..1a5b4fe228db 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,200).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.MS.LinqService,100).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.MS.LinqService,100).sql index 302fa7419737..8b516fbcfec9 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.MS.LinqService,100).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.MS.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.MS.LinqService,200).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.MS.LinqService,200).sql index 302fa7419737..d2ba10a5a149 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.MS.LinqService,200).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2016.MS.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.MS.LinqService,100).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.MS.LinqService,100).sql index a62ee0f9d1df..212c8f9da83b 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.MS.LinqService,100).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.MS.LinqService,200).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.MS.LinqService,200).sql index a62ee0f9d1df..212c8f9da83b 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.MS.LinqService,200).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2016.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,100).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,100).sql index 94f82be21fcc..b923c3bafe30 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,100).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,200).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,200).sql index 94f82be21fcc..b923c3bafe30 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,200).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2016.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..9eba55def53b --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..0864ff562cf8 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..0864ff562cf8 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2016.MS.LinqService).sql index 1ecea7b4d94e..23766dedc972 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2016.MS.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,32 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2016.MS.LinqService).sql index b421f4ec8eee..04ce62fb9f87 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2016.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..14961146ddca --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,149 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2016.MS.LinqService).sql index b421f4ec8eee..dc257a6ad0aa 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2016.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2016.MS.LinqService).sql index b421f4ec8eee..ef55b83f888c 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2016.MS.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2016.MS.LinqService).sql index c94bdc496e9c..4e365344dbc4 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2016.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2016.MS.LinqService).sql index c94bdc496e9c..4e365344dbc4 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2016.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2016.MS.LinqService).sql index e6793161210e..454b24ffdb86 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2016.MS.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,1).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,1).sql index e99edc625c83..9ac243487a20 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,1).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,2).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,2).sql index e99edc625c83..943250c9992e 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,2).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,1).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,1).sql index e99edc625c83..30746d571949 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,1).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,2).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,2).sql index e99edc625c83..0491223b1843 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,2).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.MS.LinqService,100).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.MS.LinqService,100).sql index 15df1c1db87f..74b384e50226 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.MS.LinqService,100).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.MS.LinqService,200).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.MS.LinqService,200).sql index b563e2251ec9..377148e5e037 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.MS.LinqService,200).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2016.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.MS.LinqService,100).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.MS.LinqService,100).sql index a16054d84dfa..f597cf880aa4 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.MS.LinqService,100).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.MS.LinqService,200).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.MS.LinqService,200).sql index abc89da08cee..35c9f68a6633 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.MS.LinqService,200).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2016.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,1).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,1).sql index e99edc625c83..e4cb89884ed4 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,1).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,2).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,2).sql index e99edc625c83..3a2ce72ab66b 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,2).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2016.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,1).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,1).sql index e99edc625c83..30746d571949 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,1).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,2).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,2).sql index e99edc625c83..0491223b1843 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,2).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2016.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2016.MS.LinqService).sql index 8a2bf8161286..5c26a3c17ec6 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2016.MS.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2016.MS.LinqService).sql index 8a2bf8161286..67f472f272ff 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2016.MS.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2016.MS.LinqService).sql index e8cfd9ffeb6a..7e40a2c23392 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2016.MS.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2016.MS.LinqService).sql index e8cfd9ffeb6a..736b575a6958 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2016.MS.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2016.MS SqlServer.2016 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..a43b2c36b8b3 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..077dc7e1b925 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..077dc7e1b925 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..372003940eed --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..0ff30ed9c156 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..0ff30ed9c156 --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2016.MS.LinqService).sql new file mode 100644 index 000000000000..26cb2d399a5e --- /dev/null +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2016.MS.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2016.MS.LinqService).sql index e686c88cfbe7..6a5cc6c9f578 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2016.MS.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql index 57eb43c497c5..cc067a9e0615 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 SELECT diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..252ad6a86f24 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..ffd62fb6e428 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql index 7deffb368c82..a41bd08d9026 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 SELECT diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..ca0cbe04317f 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..47d0ae817c7b 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..8e11ede04b5d 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..1ad6aaa9c198 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..f68e01162119 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..0810f2cba6fe 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql index 57eb43c497c5..cc067a9e0615 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 SELECT diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..252ad6a86f24 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..ffd62fb6e428 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql index 7deffb368c82..a41bd08d9026 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 SELECT diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..ca0cbe04317f 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..47d0ae817c7b 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..8e11ede04b5d 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..1ad6aaa9c198 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..f68e01162119 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql index 9d82baa71698..0810f2cba6fe 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2016.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql index 203dd30190d5..58b52df89dd4 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 SELECT diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql index 555ebb9549f6..12ddd48760a3 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql index 555ebb9549f6..7f2f4c2d7148 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql index 555ebb9549f6..56ac1b2f5865 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql index 555ebb9549f6..957fac7c19c9 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql index 555ebb9549f6..fc252fe3f8fb 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.MS.LinqService).sql index 555ebb9549f6..ee21d399a633 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.MS.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2016.MS.LinqService).sql index 203dd30190d5..663ad2c306f9 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2016.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 SELECT diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql index 203dd30190d5..66db9a434680 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 SELECT diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql index 555ebb9549f6..fb205ac04cab 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql index 555ebb9549f6..ad40efa1a98b 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql index 555ebb9549f6..276ce92a1ac0 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2016.MS.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql index 555ebb9549f6..e39c698cf4c6 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2016.MS.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql index 555ebb9549f6..1b9b3c8ff715 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2016.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.MS.LinqService).sql index 555ebb9549f6..31f34e12ea35 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2016.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2016.MS SqlServer.2016 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2016.MS.LinqService).sql b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2016.MS.LinqService).sql index 203dd30190d5..49e614c0eb1a 100644 --- a/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2016.MS.LinqService).sql +++ b/SqlServer.2016.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2016.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2016.MS SqlServer.2016 SELECT diff --git a/SqlServer.2016.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2016.MS).sql b/SqlServer.2016.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2016.MS).sql new file mode 100644 index 000000000000..4aa4ec5f5df0 --- /dev/null +++ b/SqlServer.2016.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2016.MS).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2016.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2016.MS).sql b/SqlServer.2016.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2016.MS).sql new file mode 100644 index 000000000000..e1d3241b9672 --- /dev/null +++ b/SqlServer.2016.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2016.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2016.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2016.MS).sql b/SqlServer.2016.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2016.MS).sql new file mode 100644 index 000000000000..e1d3241b9672 --- /dev/null +++ b/SqlServer.2016.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2016.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2016.MS SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2016/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2016).sql b/SqlServer.2016/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2016).sql new file mode 100644 index 000000000000..6a61ddd79f26 --- /dev/null +++ b/SqlServer.2016/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2016).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2016/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2016).sql b/SqlServer.2016/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2016).sql new file mode 100644 index 000000000000..e5c8bc076d72 --- /dev/null +++ b/SqlServer.2016/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2016).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2016/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2016).sql b/SqlServer.2016/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2016).sql new file mode 100644 index 000000000000..e5c8bc076d72 --- /dev/null +++ b/SqlServer.2016/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2016).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2016 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From 5547d23597b1f14808c66f1e8610b07513eb19e1 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:36:16 +0000 Subject: [PATCH 08/40] [Linux / Firebird 3.0] baselines --- ...ests.All4Async(Firebird.3.LinqService).sql | 14 + ....GroupBy2Async(Firebird.3.LinqService).sql | 30 + ...numerable1Test(Firebird.3.LinqService).sql | 9 + ...numerable2Test(Firebird.3.LinqService).sql | 11 + ...rableCast1Test(Firebird.3.LinqService).sql | 9 + ...rableCast2Test(Firebird.3.LinqService).sql | 11 + ...tainsAsyncTest(Firebird.3.LinqService).sql | 16 + ...FirstAsyncTest(Firebird.3.LinqService).sql | 15 + ...s.TakeSkipTest(Firebird.3.LinqService).sql | 16 + ...FirstOrDefault(Firebird.3.LinqService).sql | 20 + ...ookupAsyncTest(Firebird.3.LinqService).sql | 21 + ...ementAsyncTest(Firebird.3.LinqService).sql | 21 + ...s.AnyTestAsync(Firebird.3.LinqService).sql | 32 ++ ....AnyTestAsync2(Firebird.3.LinqService).sql | 32 ++ ...ethoAsyncdTest(Firebird.3.LinqService).sql | 16 + ...iledTest3Async(Firebird.3.LinqService).sql | 28 + ...tainsTestAsync(Firebird.3.LinqService).sql | 32 ++ ...CountTestAsync(Firebird.3.LinqService).sql | 24 + ...ountTestAsync2(Firebird.3.LinqService).sql | 24 + ...mentTestAsync1(Firebird.3.LinqService).sql | 28 + ...mentTestAsync2(Firebird.3.LinqService).sql | 28 + ...s.MaxTestAsync(Firebird.3.LinqService).sql | 24 + ....MaxTestAsync2(Firebird.3.LinqService).sql | 24 + ...PredicateAsync(Firebird.3.LinqService).sql | 183 +------ ...PredicateAsync(Firebird.3.LinqService).sql | 179 +----- ...PredicateAsync(Firebird.3.LinqService).sql | 181 +----- ...PredicateAsync(Firebird.3.LinqService).sql | 181 +----- ...PredicateAsync(Firebird.3.LinqService).sql | 179 +----- ...xSelectorAsync(Firebird.3.LinqService).sql | 179 +----- ...nSelectorAsync(Firebird.3.LinqService).sql | 179 +----- ...PredicateAsync(Firebird.3.LinqService).sql | 181 +----- ...PredicateAsync(Firebird.3.LinqService).sql | 181 +----- ...s.Concat1Async(Firebird.3.LinqService).sql | 19 + ...IncrementAsync(Firebird.3.LinqService).sql | 97 ++++ ...tFilteredAsync(Firebird.3.LinqService).sql | 80 +++ ...ts.Count1Async(Firebird.3.LinqService).sql | 8 + ...ts.Count2Async(Firebird.3.LinqService).sql | 10 + ...QueryMax1Async(Firebird.3.LinqService).sql | 16 + ...ests.Issue4602(Firebird.3.LinqService).sql | 110 +--- ...ssue4057_Async(Firebird.3.LinqService).sql | 31 ++ ...citTransaction(Firebird.3.LinqService).sql | 31 ++ ...xpressionAsync(Firebird.3.LinqService).sql | 25 + ...sts.Cast1Async(Firebird.3.LinqService).sql | 11 + ...ts.Test18Async(Firebird.3.LinqService).sql | 14 + ...arameter1Async(Firebird.3.LinqService).sql | 7 + ....Issue3132Test(Firebird.3.LinqService).sql | 213 ++++++++ ...At2Async(Firebird.3.LinqService,False).sql | 16 + ...tAt2Async(Firebird.3.LinqService,True).sql | 16 + ...lt3Async(Firebird.3.LinqService,False).sql | 16 + ...ult3Async(Firebird.3.LinqService,True).sql | 16 + ...ipleSkip1Async(Firebird.3.LinqService).sql | 94 +--- ...ke1Async(Firebird.3.LinqService,False).sql | 20 + ...ake1Async(Firebird.3.LinqService,True).sql | 24 + ...ke2Async(Firebird.3.LinqService,False).sql | 12 + ...ake2Async(Firebird.3.LinqService,True).sql | 12 + ...ke3Async(Firebird.3.LinqService,False).sql | 12 + ...ake3Async(Firebird.3.LinqService,True).sql | 14 + ...ke4Async(Firebird.3.LinqService,False).sql | 12 + ...ake4Async(Firebird.3.LinqService,True).sql | 14 + ...ke5Async(Firebird.3.LinqService,False).sql | 10 + ...ake5Async(Firebird.3.LinqService,True).sql | 12 + ...ebird.3.LinqService,False,False,False).sql | 19 + ...rebird.3.LinqService,False,False,True).sql | 19 + ...rebird.3.LinqService,False,True,False).sql | 19 + ...irebird.3.LinqService,False,True,True).sql | 19 + ...rebird.3.LinqService,True,False,False).sql | 19 + ...irebird.3.LinqService,True,False,True).sql | 19 + ...irebird.3.LinqService,True,True,False).sql | 19 + ...Firebird.3.LinqService,True,True,True).sql | 19 + ...ateTable1Async(Firebird.3.LinqService).sql | 59 ++ ...eateTableAsync(Firebird.3.LinqService).sql | 41 ++ ...TableNameAsync(Firebird.3.LinqService).sql | 114 ++++ ...ngleRecord(Firebird.3.LinqService,100).sql | 12 + ...ngleRecord(Firebird.3.LinqService,200).sql | 12 + ...ngleRecord(Firebird.3.LinqService,100).sql | 14 + ...ngleRecord(Firebird.3.LinqService,200).sql | 14 + ...ngleRecord(Firebird.3.LinqService,100).sql | 11 + ...ngleRecord(Firebird.3.LinqService,200).sql | 11 + ...s.Insert2Async(Firebird.3.LinqService).sql | 44 ++ ...s.Insert3Async(Firebird.3.LinqService).sql | 46 ++ ...s.Insert4Async(Firebird.3.LinqService).sql | 46 ++ ...TableNameAsync(Firebird.3.LinqService).sql | 94 ++++ ...rReplace1Async(Firebird.3.LinqService).sql | 98 ++++ ...TableNameAsync(Firebird.3.LinqService).sql | 155 ++++++ ...OrUpdate3Async(Firebird.3.LinqService).sql | 98 ++++ ...rUpdate3xAsync(Firebird.3.LinqService).sql | 104 ++++ ...Identity1Async(Firebird.3.LinqService).sql | 15 + ...Identity2Async(Firebird.3.LinqService).sql | 15 + ...Identity4Async(Firebird.3.LinqService).sql | 34 ++ ...ObjAsyncTest(Firebird.3.LinqService,1).sql | 51 +- ...ObjAsyncTest(Firebird.3.LinqService,2).sql | 51 +- ...terAsyncTest(Firebird.3.LinqService,1).sql | 51 +- ...terAsyncTest(Firebird.3.LinqService,2).sql | 51 +- ...ngleRecord(Firebird.3.LinqService,100).sql | 24 + ...ngleRecord(Firebird.3.LinqService,200).sql | 24 + ...ObjAsyncTest(Firebird.3.LinqService,1).sql | 51 +- ...ObjAsyncTest(Firebird.3.LinqService,2).sql | 51 +- ...terAsyncTest(Firebird.3.LinqService,1).sql | 51 +- ...terAsyncTest(Firebird.3.LinqService,2).sql | 51 +- ...outActionAsync(Firebird.3.LinqService).sql | 52 ++ ...tFromQueryAsyn(Firebird.3.LinqService).sql | 39 ++ ...tFromTableAsyn(Firebird.3.LinqService).sql | 37 ++ ....Update12Async(Firebird.3.LinqService).sql | 28 + ...s.Update1Async(Firebird.3.LinqService).sql | 54 ++ ...s.Update2Async(Firebird.3.LinqService).sql | 54 ++ ...s.Update4Async(Firebird.3.LinqService).sql | 63 +++ ...ociation1Async(Firebird.3.LinqService).sql | 47 ++ ...ation1AsyncOld(Firebird.3.LinqService).sql | 47 ++ ...TableNameAsync(Firebird.3.LinqService).sql | 132 +++++ ...eComplex1Async(Firebird.3.LinqService).sql | 57 ++ ...ncSingleRecord(Firebird.3.LinqService).sql | 517 +++--------------- ...teSingleRecord(Firebird.3.LinqService).sql | 513 ++--------------- ...teSingleRecord(Firebird.3.LinqService).sql | 512 ++--------------- ...ncSingleRecord(Firebird.3.LinqService).sql | 517 +++--------------- ...teSingleRecord(Firebird.3.LinqService).sql | 513 ++--------------- ...teSingleRecord(Firebird.3.LinqService).sql | 512 ++--------------- ...ncSingleRecord(Firebird.3.LinqService).sql | 243 +------- ...ncSingleRecord(Firebird.3.LinqService).sql | 239 +------- ...ldSingleRecord(Firebird.3.LinqService).sql | 238 +------- ...ncSingleRecord(Firebird.3.LinqService).sql | 244 +-------- ...ncSingleRecord(Firebird.3.LinqService).sql | 240 +------- ...ldSingleRecord(Firebird.3.LinqService).sql | 239 +------- ...Tests.Linq.AsyncTests.Test(Firebird.3).sql | 18 + ...ests.Linq.AsyncTests.Test1(Firebird.3).sql | 9 + ...inq.AsyncTests.TestForEach(Firebird.3).sql | 9 + 125 files changed, 3871 insertions(+), 6027 deletions(-) create mode 100644 Firebird.3.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.3.LinqService,False).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.3.LinqService,True).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.3.LinqService,False).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.3.LinqService,True).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.3.LinqService,False).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.3.LinqService,True).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.3.LinqService,False).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.3.LinqService,True).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.3.LinqService,False).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.3.LinqService,True).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.3.LinqService,False).sql create mode 100644 Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.3.LinqService,True).sql create mode 100644 Firebird.3.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.3.LinqService).sql create mode 100644 Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.3.LinqService).sql create mode 100644 Firebird.3/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.3).sql create mode 100644 Firebird.3/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.3).sql create mode 100644 Firebird.3/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.3).sql diff --git a/Firebird.3.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..a685903d0020 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.3.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" <= 3 + ) +FROM rdb$database + diff --git a/Firebird.3.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..979f31f702f2 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.3.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT DISTINCT + "a_Parent1"."ParentID" + FROM + "Child" "t1" + INNER JOIN "Parent" "a_Parent1" ON "t1"."ParentID" = "a_Parent1"."ParentID" + ) "m_1" + INNER JOIN "Child" "d" + INNER JOIN "Parent" "a_Parent1_1" ON "d"."ParentID" = "a_Parent1_1"."ParentID" + ON "m_1"."ParentID" = "a_Parent1_1"."ParentID" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "a_Parent1"."ParentID" +FROM + "Child" "t1" + INNER JOIN "Parent" "a_Parent1" ON "t1"."ParentID" = "a_Parent1"."ParentID" +GROUP BY + "a_Parent1"."ParentID" + diff --git a/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..2ed40601b2ad --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.3.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..a285432eb648 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.3.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" > 1 + diff --git a/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..2ed40601b2ad --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.3.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..a285432eb648 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.3.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" > 1 + diff --git a/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..9bd98fc74332 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.3.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Person" "t1" + WHERE + CAST(@ID AS Int) = "t1"."PersonID" + ) +FROM rdb$database + diff --git a/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..6c5913c194be --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.3.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."PersonID" = 1 +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.3.LinqService).sql index 2083b29fb6f5..b16aa7706c60 100644 --- a/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.3.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY "t1"."ParentID" OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @skip Integer -- Int32 +SET @skip = 1 +DECLARE @take Integer -- Int32 +SET @take = 2 + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" +ORDER BY + "t1"."ParentID" +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..12c74cd14dd4 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.3.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer -- Int32 +SET @p_2 = 3 +DECLARE @param Integer -- Int32 +SET @param = 4 + +SELECT + "o"."ParentID", + "o"."Value1" +FROM + "Parent" "o" +WHERE + "o"."ParentID" IN (@p, @p_1, @p_2) OR "o"."ParentID" = @param +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..bd826db6ab90 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.3.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +ORDER BY + "t1"."ParentID", + "t1"."ChildID" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..bd826db6ab90 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.3.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +ORDER BY + "t1"."ParentID", + "t1"."ChildID" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..5f4e8e2eb8ac --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.3.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) +FROM rdb$database + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) +FROM rdb$database + diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..5f4e8e2eb8ac --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.3.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) +FROM rdb$database + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) +FROM rdb$database + diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..43eb70fb0a0c --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.3.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = @p +ORDER BY + "x"."ParentID" DESC +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..cbccbbe2263e --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.3.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT @p ROWS ONLY + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT @p ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..e7a5e76ceb75 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.3.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + CAST(@p AS Int) = "c_1"."ParentID" + ) +FROM rdb$database + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + CAST(@p AS Int) = "c_1"."ParentID" + ) +FROM rdb$database + diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..d8d5262b5565 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.3.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..d8d5262b5565 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.3.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..1e41728f32bc --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.3.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..1e41728f32bc --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.3.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..4e3e68f202cb --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.3.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..4e3e68f202cb --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.3.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.3.LinqService).sql index 7967adcf8776..85572bf5b3bd 100644 --- a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.3.LinqService).sql @@ -1,171 +1,16 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + "AsyncDataTable" "c_1" + WHERE + "c_1"."Id" = @p + ) +FROM rdb$database diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.3.LinqService).sql index 7967adcf8776..83719293d59c 100644 --- a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.3.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = @p diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.3.LinqService).sql index 7967adcf8776..c3e22d333005 100644 --- a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.3.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 1 ROWS ONLY diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.3.LinqService).sql index 7967adcf8776..c3e22d333005 100644 --- a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.3.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 1 ROWS ONLY diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.3.LinqService).sql index 7967adcf8776..83719293d59c 100644 --- a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.3.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = @p diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.3.LinqService).sql index 7967adcf8776..d882c3fbb0cb 100644 --- a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.3.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MAX("c_1"."Id") +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" > @p diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.3.LinqService).sql index 7967adcf8776..ed011b1760e2 100644 --- a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.3.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MIN("c_1"."Id") +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" > @p diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.3.LinqService).sql index 7967adcf8776..45273daad69c 100644 --- a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.3.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 2 ROWS ONLY diff --git a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.3.LinqService).sql index 7967adcf8776..45273daad69c 100644 --- a/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.3.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 2 ROWS ONLY diff --git a/Firebird.3.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..30277b6433e8 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.3.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" = 1 +UNION ALL +SELECT + "p_1"."ParentID", + "p_1"."Value1" +FROM + "Parent" "p_1" +WHERE + "p_1"."ParentID" = 2 + diff --git a/Firebird.3.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.3.LinqService).sql index b97bb5036454..be2430208eb3 100644 --- a/Firebird.3.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.3.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Firebird.3 Firebird3 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.3 Firebird3 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.3 Firebird3 @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.3 Firebird3 @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" "obj" +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.3 Firebird3 @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" "obj" +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.3 Firebird3 diff --git a/Firebird.3.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.3.LinqService).sql index 3707e76b768c..bc5a8ee45a8a 100644 --- a/Firebird.3.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.3.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Firebird.3 Firebird3 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" "r" +SET + "Stamp" = "r"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "r"."Id" = 2 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.3 Firebird3 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" "r" +SET + "Stamp" = "r"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "r"."Id" = 1 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.3 Firebird3 @@ -28,6 +84,18 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" "r" +WHERE + "r"."Id" = 2 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.3 Firebird3 @@ -38,6 +106,18 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" "r" +WHERE + "r"."Id" = 1 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.3 Firebird3 diff --git a/Firebird.3.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..1fdabc8d41e9 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.3.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" "t1" + diff --git a/Firebird.3.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..c572209109e9 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.3.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 2 + diff --git a/Firebird.3.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..1a8ae3dff62d --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.3.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" "c_1" + LEFT JOIN "Parent" "a_Parent" ON "c_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "a_Parent"."ParentID" = "t1"."ParentID" + )) +FROM + "Parent" "t1" + diff --git a/Firebird.3.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.3.LinqService).sql index bf7e4a322595..d9fc471501d3 100644 --- a/Firebird.3.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.3.LinqService).sql @@ -1,103 +1,11 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicParent"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicParent')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DynamicParent" - ( - ID Int NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY (ID) - ) - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT ' - CREATE GENERATOR "GIDENTITY_DynamicParent" - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT ' - CREATE TRIGGER "TIDENTITY_DynamicParent" FOR "DynamicParent" - BEFORE INSERT POSITION 0 - AS BEGIN - NEW.ID = GEN_ID("GIDENTITY_DynamicParent", 1); - END - '; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicChild"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicChild')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DynamicChild" - ( - ID Int NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY (ID) - ) - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT ' - CREATE GENERATOR "GIDENTITY_DynamicChild" - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT ' - CREATE TRIGGER "TIDENTITY_DynamicChild" FOR "DynamicChild" - BEFORE INSERT POSITION 0 - AS BEGIN - NEW.ID = GEN_ID("GIDENTITY_DynamicChild", 1); - END - '; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicChild"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicParent"'; -END +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "it".ID +FROM + "DynamicParent" "it" + LEFT JOIN "DynamicChild" "a_Child" ON "it".ID = "a_Child"."ParentID" +WHERE + "a_Child".ID = 123 diff --git a/Firebird.3.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.3.LinqService).sql index 0fdef06d0b9c..becd18fcb4e8 100644 --- a/Firebird.3.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.3.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT + "x"."ParentID" + FROM + "Parent" "x" + WHERE + "x"."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) "m_1" + INNER JOIN "Child" "d" ON "m_1"."ParentID" = "d"."ParentID" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- Firebird.3 Firebird3 (asynchronously) diff --git a/Firebird.3.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.3.LinqService).sql index d430ac9b6b32..3fd10733c283 100644 --- a/Firebird.3.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.3.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT + "x"."ParentID" + FROM + "Parent" "x" + WHERE + "x"."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) "m_1" + INNER JOIN "Child" "d" ON "m_1"."ParentID" = "d"."ParentID" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransaction BeforeExecute -- Firebird.3 Firebird3 (asynchronously) diff --git a/Firebird.3.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..bb45a25090be --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.3.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" "a_Children" + INNER JOIN "GrandChild" "a_GrandChildren" ON "a_Children"."ParentID" = "a_GrandChildren"."ParentID" AND "a_Children"."ChildID" = "a_GrandChildren"."ChildID" + WHERE + "p"."ParentID" = "a_Children"."ParentID" + ) +FROM + "Parent" "p" + diff --git a/Firebird.3.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..fb5bebf46cc8 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.3.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" +WHERE + "t1"."Value1" = 1 + diff --git a/Firebird.3.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..15a4faaee26f --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.3.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT DISTINCT + "p1"."PersonID", + "p1"."Gender", + "p1"."FirstName", + "p1"."LastName" +FROM + "Person" "p1" +WHERE + "p1"."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + "p1"."Gender" = 'F' + diff --git a/Firebird.3.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..efdc73e084a1 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.3.LinqService).sql @@ -0,0 +1,7 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + 1 +FROM rdb$database + diff --git a/Firebird.3.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..17b54c63d473 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.3.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "x"."MiddleName", + COUNT(*) +FROM + "Person" "x" +WHERE + "x"."MiddleName" IS NOT NULL +GROUP BY + "x"."MiddleName" +UNION ALL +SELECT + "x_1"."MiddleName", + COUNT(*) +FROM + "Person" "x_1" +WHERE + "x_1"."MiddleName" IS NOT NULL +GROUP BY + "x_1"."MiddleName" +UNION ALL +SELECT + "x_2"."MiddleName", + COUNT(*) +FROM + "Person" "x_2" +WHERE + "x_2"."MiddleName" IS NOT NULL +GROUP BY + "x_2"."MiddleName" +UNION ALL +SELECT + "x_3"."MiddleName", + COUNT(*) +FROM + "Person" "x_3" +WHERE + "x_3"."MiddleName" IS NOT NULL +GROUP BY + "x_3"."MiddleName" +UNION ALL +SELECT + "x_4"."MiddleName", + COUNT(*) +FROM + "Person" "x_4" +WHERE + "x_4"."MiddleName" IS NOT NULL +GROUP BY + "x_4"."MiddleName" +UNION ALL +SELECT + "x_5"."MiddleName", + COUNT(*) +FROM + "Person" "x_5" +WHERE + "x_5"."MiddleName" IS NOT NULL +GROUP BY + "x_5"."MiddleName" +UNION ALL +SELECT + "x_6"."MiddleName", + COUNT(*) +FROM + "Person" "x_6" +WHERE + "x_6"."MiddleName" IS NOT NULL +GROUP BY + "x_6"."MiddleName" +UNION ALL +SELECT + "x_7"."MiddleName", + COUNT(*) +FROM + "Person" "x_7" +WHERE + "x_7"."MiddleName" IS NOT NULL +GROUP BY + "x_7"."MiddleName" +UNION ALL +SELECT + "x_8"."MiddleName", + COUNT(*) +FROM + "Person" "x_8" +WHERE + "x_8"."MiddleName" IS NOT NULL +GROUP BY + "x_8"."MiddleName" +UNION ALL +SELECT + "x_9"."MiddleName", + COUNT(*) +FROM + "Person" "x_9" +WHERE + "x_9"."MiddleName" IS NOT NULL +GROUP BY + "x_9"."MiddleName" +UNION ALL +SELECT + "x_10"."MiddleName", + COUNT(*) +FROM + "Person" "x_10" +WHERE + "x_10"."MiddleName" IS NOT NULL +GROUP BY + "x_10"."MiddleName" +UNION ALL +SELECT + "x_11"."MiddleName", + COUNT(*) +FROM + "Person" "x_11" +WHERE + "x_11"."MiddleName" IS NOT NULL +GROUP BY + "x_11"."MiddleName" +UNION ALL +SELECT + "x_12"."MiddleName", + COUNT(*) +FROM + "Person" "x_12" +WHERE + "x_12"."MiddleName" IS NOT NULL +GROUP BY + "x_12"."MiddleName" +UNION ALL +SELECT + "x_13"."MiddleName", + COUNT(*) +FROM + "Person" "x_13" +WHERE + "x_13"."MiddleName" IS NOT NULL +GROUP BY + "x_13"."MiddleName" +UNION ALL +SELECT + "x_14"."MiddleName", + COUNT(*) +FROM + "Person" "x_14" +WHERE + "x_14"."MiddleName" IS NOT NULL +GROUP BY + "x_14"."MiddleName" +UNION ALL +SELECT + "x_15"."MiddleName", + COUNT(*) +FROM + "Person" "x_15" +WHERE + "x_15"."MiddleName" IS NOT NULL +GROUP BY + "x_15"."MiddleName" +UNION ALL +SELECT + "x_16"."MiddleName", + COUNT(*) +FROM + "Person" "x_16" +WHERE + "x_16"."MiddleName" IS NOT NULL +GROUP BY + "x_16"."MiddleName" +UNION ALL +SELECT + "x_17"."MiddleName", + COUNT(*) +FROM + "Person" "x_17" +WHERE + "x_17"."MiddleName" IS NOT NULL +GROUP BY + "x_17"."MiddleName" +UNION ALL +SELECT + "x_18"."MiddleName", + COUNT(*) +FROM + "Person" "x_18" +WHERE + "x_18"."MiddleName" IS NOT NULL +GROUP BY + "x_18"."MiddleName" +UNION ALL +SELECT + "x_19"."MiddleName", + COUNT(*) +FROM + "Person" "x_19" +WHERE + "x_19"."MiddleName" IS NOT NULL +GROUP BY + "x_19"."MiddleName" +UNION ALL +SELECT + "x_20"."MiddleName", + COUNT(*) +FROM + "Person" "x_20" +WHERE + "x_20"."MiddleName" IS NOT NULL +GROUP BY + "x_20"."MiddleName" + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.3.LinqService,False).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.3.LinqService,False).sql new file mode 100644 index 000000000000..8a0900014997 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.3.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.3.LinqService,True).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.3.LinqService,True).sql new file mode 100644 index 000000000000..8a0900014997 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.3.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.3.LinqService,False).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.3.LinqService,False).sql new file mode 100644 index 000000000000..8a0900014997 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.3.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.3.LinqService,True).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.3.LinqService,True).sql new file mode 100644 index 000000000000..8a0900014997 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.3.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.3.LinqService).sql index da2d58a76289..fd55f4fba483 100644 --- a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.3.LinqService).sql @@ -1,85 +1,13 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TakeSkipClass')) THEN - EXECUTE STATEMENT 'DROP TABLE "TakeSkipClass"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TakeSkipClass')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TakeSkipClass" - ( - "Value" VarChar(10) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Value VarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Value VarChar(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Value VarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Value VarChar(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TakeSkipClass')) THEN - EXECUTE STATEMENT 'DROP TABLE "TakeSkipClass"'; -END +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @skip Integer -- Int32 +SET @skip = 3 + +SELECT + "t1"."Value" +FROM + "TakeSkipClass" "t1" +ORDER BY + "t1"."Value" +OFFSET @skip ROWS diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.3.LinqService,False).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.3.LinqService,False).sql index d0d75dac8518..ee00fb3b9e05 100644 --- a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.3.LinqService,False).sql +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.3.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" "ch" FETCH NEXT 3 ROWS ONLY +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT 3 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.3.LinqService,True).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.3.LinqService,True).sql index 1622a8ccdeac..22ebd5c29714 100644 --- a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.3.LinqService,True).sql +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.3.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" "ch" FETCH NEXT @take ROWS ONLY +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT @take ROWS ONLY + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.3.LinqService,False).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.3.LinqService,False).sql new file mode 100644 index 000000000000..48a103e3b55b --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.3.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT @n ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.3.LinqService,True).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.3.LinqService,True).sql new file mode 100644 index 000000000000..48a103e3b55b --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.3.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT @n ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.3.LinqService,False).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.3.LinqService,False).sql new file mode 100644 index 000000000000..f2af7848e30d --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.3.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" > 3 OR "ch"."ChildID" < 4 +FETCH NEXT 3 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.3.LinqService,True).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.3.LinqService,True).sql new file mode 100644 index 000000000000..3da2c6b68a8a --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.3.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" > 3 OR "ch"."ChildID" < 4 +FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.3.LinqService,False).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.3.LinqService,False).sql new file mode 100644 index 000000000000..3328118cbb76 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.3.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" >= 0 AND "ch"."ChildID" <= 100 +FETCH NEXT 3 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.3.LinqService,True).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.3.LinqService,True).sql new file mode 100644 index 000000000000..b9db39a89622 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.3.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" >= 0 AND "ch"."ChildID" <= 100 +FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.3.LinqService,False).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.3.LinqService,False).sql new file mode 100644 index 000000000000..285b23362db6 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.3.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT 3 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.3.LinqService,True).sql b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.3.LinqService,True).sql new file mode 100644 index 000000000000..c8793fdc0c16 --- /dev/null +++ b/Firebird.3.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.3.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,False,False).sql b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,False,False).sql index 2cc482da25e7..1e99f891d6b0 100644 --- a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,False,False).sql +++ b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,False,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,False,True).sql b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,False,True).sql index 2cc482da25e7..1e99f891d6b0 100644 --- a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,False,True).sql +++ b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,False,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,True,False).sql b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,True,False).sql index 2cc482da25e7..1e99f891d6b0 100644 --- a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,True,False).sql +++ b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,True,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,True,True).sql b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,True,True).sql index 2cc482da25e7..1e99f891d6b0 100644 --- a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,True,True).sql +++ b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,False,True,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,False,False).sql b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,False,False).sql index 2cc482da25e7..1e99f891d6b0 100644 --- a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,False,False).sql +++ b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,False,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,False,True).sql b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,False,True).sql index 2cc482da25e7..1e99f891d6b0 100644 --- a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,False,True).sql +++ b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,False,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,True,False).sql b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,True,False).sql index 2cc482da25e7..1e99f891d6b0 100644 --- a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,True,False).sql +++ b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,True,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,True,True).sql b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,True,True).sql index 2cc482da25e7..1e99f891d6b0 100644 --- a/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,True,True).sql +++ b/Firebird.3.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.3.LinqService,True,True,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.3.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..8ccab11eb23b --- /dev/null +++ b/Firebird.3.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.3.LinqService).sql @@ -0,0 +1,59 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_TestTable')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_TestTable"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_TestTable')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_TestTable"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TestTable')) THEN + EXECUTE STATEMENT 'DROP TABLE "TestTable"'; +END + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "TestTable" + ( + ID Int NOT NULL, + "Field1" VarChar(50) CHARACTER SET UNICODE_FSS, + "Field2" VarChar(255) CHARACTER SET UNICODE_FSS, + "CreatedOn" TimeStamp, + + CONSTRAINT "PK_TestTable" PRIMARY KEY (ID) + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_TestTable" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_TestTable" FOR "TestTable" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW.ID = GEN_ID("GIDENTITY_TestTable", 1); + END + '; +END + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1".ID, + "t1"."Field1", + "t1"."Field2", + "t1"."CreatedOn" +FROM + "TestTable" "t1" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_TestTable"'; + EXECUTE STATEMENT 'DROP TABLE "TestTable"'; +END + diff --git a/Firebird.3.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.3.LinqService).sql index 41631b30c1ae..d2f06a5d1e82 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.3.LinqService).sql @@ -1,4 +1,37 @@ BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TempTable')) THEN + EXECUTE STATEMENT 'DROP TABLE "TempTable"'; +END + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TempTable')) THEN + EXECUTE STATEMENT ' + CREATE TABLE "TempTable" + ( + ID Int NOT NULL + ) + '; +END + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +INSERT INTO "TempTable" +( + ID +) +SELECT + "p"."ParentID" +FROM + "Parent" "p" + +BeforeExecute -- Firebird.3 Firebird3 SELECT @@ -7,3 +40,11 @@ FROM "Parent" "p" INNER JOIN "TempTable" "t" ON "p"."ParentID" = "t".ID +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TempTable')) THEN + EXECUTE STATEMENT 'DROP TABLE "TempTable"'; +END + diff --git a/Firebird.3.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..753d18574315 --- /dev/null +++ b/Firebird.3.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.3.LinqService).sql @@ -0,0 +1,114 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_xxPerson_fl_30')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_30"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_xxPerson_fl_30')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_30"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPerson_fl_30')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_30"'; +END + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "xxPerson_fl_30" + ( + "FirstName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "MiddleName" VarChar(255) CHARACTER SET UNICODE_FSS, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_fl_30" PRIMARY KEY ("PersonID") + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_xxPerson_fl_30" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_xxPerson_fl_30" FOR "xxPerson_fl_30" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW."PersonID" = GEN_ID("GIDENTITY_xxPerson_fl_30", 1); + END + '; +END + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson_fl_30" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_30" "t1" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson_fl_30" "t1" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson_fl_30" "t1" +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_30" "t1" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_30"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_30"'; + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_30"'; +END + diff --git a/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.3.LinqService,100).sql b/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.3.LinqService,100).sql index ca48de82e8c8..93683a0f1da0 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.3.LinqService,100).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.3.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id", + "s"."Value", + "s"."ValueStr" + diff --git a/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.3.LinqService,200).sql b/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.3.LinqService,200).sql index ca48de82e8c8..93683a0f1da0 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.3.LinqService,200).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.3.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id", + "s"."Value", + "s"."ValueStr" + diff --git a/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,100).sql b/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,100).sql index ca48de82e8c8..baa2652697f8 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,100).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,200).sql b/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,200).sql index ca48de82e8c8..7181afc97bb8 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,200).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,100).sql b/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,100).sql index ca48de82e8c8..d01fb3ae0656 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,100).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id" + 1, + "s"."ValueStr" || CAST(1 AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,200).sql b/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,200).sql index ca48de82e8c8..d01fb3ae0656 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,200).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.3.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id" + 1, + "s"."ValueStr" || CAST(1 AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..e912621df3e3 --- /dev/null +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.3.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..d252ab4a05d4 --- /dev/null +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.3.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + "c_1"."ParentID", + CAST(@id AS Int) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = 11 + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..d252ab4a05d4 --- /dev/null +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.3.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + "c_1"."ParentID", + CAST(@id AS Int) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = 11 + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.3.LinqService).sql index e092e5708c42..e1490b8d55ea 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.3.LinqService).sql @@ -1,5 +1,59 @@ BeforeExecute -- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "xxPerson_fl_31" + ( + "FirstName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "MiddleName" VarChar(255) CHARACTER SET UNICODE_FSS, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_fl_31" PRIMARY KEY ("PersonID") + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_xxPerson_fl_31" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_xxPerson_fl_31" FOR "xxPerson_fl_31" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW."PersonID" = GEN_ID("GIDENTITY_xxPerson_fl_31", 1); + END + '; +END + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson_fl_31" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) DECLARE @FirstName VarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName VarChar(4) -- String @@ -58,3 +112,43 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_31" "t1" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_31" "p" +WHERE + "p"."FirstName" = 'Steven' AND "p"."LastName" = 'King' AND + "p"."Gender" = 'M' + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_31"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_31"'; + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_31"'; +END + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_xxPerson_fl_31')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_31"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_xxPerson_fl_31')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_31"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPerson_fl_31')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_31"'; +END + diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.3.LinqService).sql index bba0a8c89b98..a9042c8cf8d3 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.3.LinqService).sql @@ -33,3 +33,101 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc0' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc1' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc2' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id +FETCH NEXT 2 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..9925fc8b8941 --- /dev/null +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.3.LinqService).sql @@ -0,0 +1,155 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPatient21')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPatient21"'; +END + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +CREATE TABLE "xxPatient21" +( + "PersonID" Int NOT NULL, + "Diagnosis" VarChar(255) CHARACTER SET UNICODE_FSS, + + CONSTRAINT "PK_xxPatient21" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient21" "t1" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient21" "t1" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPatient21')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPatient21"'; +END + diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.3.LinqService).sql index bba0a8c89b98..30a3cf2a7f08 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.3.LinqService).sql @@ -33,3 +33,101 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id +FETCH NEXT 2 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.3.LinqService).sql index bba0a8c89b98..64fdaffb1053 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.3.LinqService).sql @@ -33,3 +33,107 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 +DECLARE @id Integer -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 +DECLARE @id Integer -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 +DECLARE @id Integer -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id +FETCH NEXT 2 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.3.LinqService).sql index 475b1488cee8..1dd48d912be7 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.3.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = 'John' AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Firebird.3 Firebird3 diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.3.LinqService).sql index 475b1488cee8..1dd48d912be7 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.3.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = 'John' AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Firebird.3 Firebird3 diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.3.LinqService).sql index 52d826fc3684..fa5d25628873 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.3.LinqService).sql @@ -36,6 +36,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John0' + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = @p AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Firebird.3 Firebird3 (asynchronously) DECLARE @FirstName VarChar(5) -- String @@ -66,6 +83,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John1' + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = @p AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Firebird.3 Firebird3 diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.3.LinqService,1).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.3.LinqService,1).sql index 10a1436b3cf8..6f82078acd5e 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.3.LinqService,1).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.3.LinqService,1).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.3 Firebird3 +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.3.LinqService,2).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.3.LinqService,2).sql index 10a1436b3cf8..9a20a55b0d56 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.3.LinqService,2).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.3.LinqService,2).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.3 Firebird3 +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,1).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,1).sql index 10a1436b3cf8..cc1056da6d49 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,1).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,1).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.3 Firebird3 +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,2).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,2).sql index 10a1436b3cf8..5c479bdd13be 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,2).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,2).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.3 Firebird3 +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.3.LinqService,100).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.3.LinqService,100).sql index 79127b69cb69..3e2584521533 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.3.LinqService,100).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.3.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) +FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- Firebird.3 Firebird3 DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.3.LinqService,200).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.3.LinqService,200).sql index b58a83367a14..fe1a2d3ed2dd 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.3.LinqService,200).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.3.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) +FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- Firebird.3 Firebird3 DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.3.LinqService,1).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.3.LinqService,1).sql index 10a1436b3cf8..980700eae4cd 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.3.LinqService,1).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.3.LinqService,1).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.3 Firebird3 +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Id", + "Value", + "ValueStr" +) +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.3.LinqService,2).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.3.LinqService,2).sql index 10a1436b3cf8..ec495d372378 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.3.LinqService,2).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.3.LinqService,2).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.3 Firebird3 +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Id", + "Value", + "ValueStr" +) +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,1).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,1).sql index 10a1436b3cf8..cc1056da6d49 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,1).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,1).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.3 Firebird3 +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,2).sql b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,2).sql index 10a1436b3cf8..5c479bdd13be 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,2).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.3.LinqService,2).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.3 Firebird3 +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.3.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(Firebird.3.LinqService).sql index 516f33618f86..b65e435f3942 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(Firebird.3.LinqService).sql @@ -218,3 +218,55 @@ VALUES @Field4 ) +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" + WHERE + "t1"."Id" = 5 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) +RETURNING + OLD."Id", + OLD."Field1", + OLD."Field2", + OLD."Field3", + OLD."Field4", + OLD."Field5", + NEW."Id", + NEW."Field1", + NEW."Field2", + NEW."Field3", + NEW."Field4", + NEW."Field5" + diff --git a/Firebird.3.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.3.LinqService).sql index f1ce258067f0..672d78037082 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.3.LinqService).sql @@ -218,6 +218,45 @@ VALUES @Field4 ) +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" + WHERE + "t1"."Id" = 5 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Firebird.3 Firebird3 diff --git a/Firebird.3.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.3.LinqService).sql index f1ce258067f0..4445991abd6f 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.3.LinqService).sql @@ -218,6 +218,43 @@ VALUES @Field4 ) +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Firebird.3 Firebird3 diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..344b36cbd065 --- /dev/null +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.3.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = ( + SELECT + "p2_1"."ParentID" + FROM + "Parent" "p1_1" + INNER JOIN "Parent" "p2_1" ON "p1_1"."ParentID" = "p2_1"."ParentID" + WHERE + "p1_1"."ParentID" < 3 AND "Parent"."ParentID" = "p1_1"."ParentID" AND + ("Parent"."Value1" = "p1_1"."Value1" OR "Parent"."Value1" IS NULL AND "p1_1"."Value1" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "Parent" "p1" + INNER JOIN "Parent" "p2" ON "p1"."ParentID" = "p2"."ParentID" + WHERE + "p1"."ParentID" < 3 AND "Parent"."ParentID" = "p1"."ParentID" AND + ("Parent"."Value1" = "p1"."Value1" OR "Parent"."Value1" IS NULL AND "p1"."Value1" IS NULL) + ) + diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..5b42b4ce0d43 --- /dev/null +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.3.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" "p" +SET + "ParentID" = "p"."ParentID" + 1 +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @p + diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..5b42b4ce0d43 --- /dev/null +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.3.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" "p" +SET + "ParentID" = "p"."ParentID" + 1 +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @p + diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..418fc6221039 --- /dev/null +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.3.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "c_1" + LEFT JOIN "Parent" "a_Parent" ON "c_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "c_1"."ChildID" = @id AND + "a_Parent"."Value1" = 1 AND + "Child"."ParentID" = "c_1"."ParentID" AND + "Child"."ChildID" = "c_1"."ChildID" + ) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @p + diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..3b189ddc7d96 --- /dev/null +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.3.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "child_1" + LEFT JOIN "Parent" "a_Parent" ON "child_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "child_1"."ChildID" = 10000 AND "Parent"."ParentID" = "a_Parent"."ParentID" AND + ("Parent"."Value1" = "a_Parent"."Value1" OR "Parent"."Value1" IS NULL AND "a_Parent"."Value1" IS NULL) + ) + diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..3b189ddc7d96 --- /dev/null +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.3.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "child_1" + LEFT JOIN "Parent" "a_Parent" ON "child_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "child_1"."ChildID" = 10000 AND "Parent"."ParentID" = "a_Parent"."ParentID" AND + ("Parent"."Value1" = "a_Parent"."Value1" OR "Parent"."Value1" IS NULL AND "a_Parent"."Value1" IS NULL) + ) + diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.3.LinqService).sql new file mode 100644 index 000000000000..a42da30a7b70 --- /dev/null +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.3.LinqService).sql @@ -0,0 +1,132 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_xxPerson_fl_33')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_33"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_xxPerson_fl_33')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_33"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPerson_fl_33')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_33"'; +END + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "xxPerson_fl_33" + ( + "FirstName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "MiddleName" VarChar(255) CHARACTER SET UNICODE_FSS, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_fl_33" PRIMARY KEY ("PersonID") + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_xxPerson_fl_33" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_xxPerson_fl_33" FOR "xxPerson_fl_33" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW."PersonID" = GEN_ID("GIDENTITY_xxPerson_fl_33", 1); + END + '; +END + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson_fl_33" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_33" "t1" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson_fl_33" "t1" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +UPDATE + "xxPerson_fl_33" "t1" +SET + "FirstName" = CAST(@FirstName AS VARCHAR(6)), + "LastName" = CAST(@LastName AS VARCHAR(4)), + "MiddleName" = CAST(@MiddleName AS VARCHAR(4)), + "Gender" = CAST(@Gender AS Char(1)) +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson_fl_33" "t1" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_33"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_33"'; + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_33"'; +END + diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.3.LinqService).sql index d28d43f9ac2e..14bf6f4986c1 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.3.LinqService).sql @@ -35,3 +35,60 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 6 + +SELECT + "t1"."PersonID", + "t1"."Gender", + "t1"."FirstName", + "t1"."MiddleName", + "t1"."LastName" +FROM + "Person" "t1" +WHERE + "t1"."PersonID" = @id +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName VarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName VarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName VarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer -- Int32 +SET @ID = 6 + +UPDATE + "Person" "t1" +SET + "Gender" = CAST(@Gender AS CHAR(1)), + "FirstName" = CAST(@Name_FirstName AS VARCHAR(13)), + "MiddleName" = CAST(@Name_MiddleName AS VARCHAR(1)), + "LastName" = CAST(@Name_LastName AS VARCHAR(13)) +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 6 + +SELECT + "t1"."PersonID", + "t1"."Gender", + "t1"."FirstName", + "t1"."MiddleName", + "t1"."LastName" +FROM + "Person" "t1" +WHERE + "t1"."PersonID" = @id +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql index a20039c6252a..3e0090bf9a40 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql @@ -1,458 +1,63 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.3.LinqService).sql index a20039c6252a..9d969a13109f 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.3.LinqService).sql @@ -1,458 +1,59 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.3.LinqService).sql index a20039c6252a..578553748d9e 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.3.LinqService).sql @@ -1,458 +1,58 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + NEW."Value" diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql index a20039c6252a..3e0090bf9a40 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql @@ -1,458 +1,63 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.3.LinqService).sql index a20039c6252a..9d969a13109f 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.3.LinqService).sql @@ -1,458 +1,59 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.3.LinqService).sql index a20039c6252a..578553748d9e 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.3.LinqService).sql @@ -1,458 +1,58 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + NEW."Value" diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql index 0a42d206e7e0..f4259f9544ad 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql @@ -1,229 +1,18 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql index 0a42d206e7e0..73a269aa8e42 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql @@ -1,229 +1,14 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.3.LinqService).sql index 0a42d206e7e0..c0d15d224248 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.3.LinqService).sql @@ -1,229 +1,13 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + NEW."Value" diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql index 0a42d206e7e0..3a616aed7f1e 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql @@ -1,229 +1,19 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Id" = "s"."Id", + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql index 0a42d206e7e0..6846066266ba 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(Firebird.3.LinqService).sql @@ -1,229 +1,15 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Id" = "s"."Id", + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.3.LinqService).sql b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.3.LinqService).sql index 0a42d206e7e0..f8b8302b405b 100644 --- a/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.3.LinqService).sql +++ b/Firebird.3.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.3.LinqService).sql @@ -1,229 +1,14 @@ BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.3 Firebird3 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.3 Firebird3 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Id" = "s"."Id", + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + NEW."Value" diff --git a/Firebird.3/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.3).sql b/Firebird.3/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.3).sql new file mode 100644 index 000000000000..189733b7a97f --- /dev/null +++ b/Firebird.3/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.3).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.3/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.3).sql b/Firebird.3/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.3).sql new file mode 100644 index 000000000000..2ed40601b2ad --- /dev/null +++ b/Firebird.3/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.3).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.3/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.3).sql b/Firebird.3/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.3).sql new file mode 100644 index 000000000000..2ed40601b2ad --- /dev/null +++ b/Firebird.3/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.3).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.3 Firebird3 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + From 2bfa8134b164463a942e09260ae0db324e642937 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:37:40 +0000 Subject: [PATCH 09/40] [Linux / Firebird 5.0] baselines --- ...ests.All4Async(Firebird.5.LinqService).sql | 14 + ....GroupBy2Async(Firebird.5.LinqService).sql | 30 ++ ...numerable1Test(Firebird.5.LinqService).sql | 9 + ...numerable2Test(Firebird.5.LinqService).sql | 11 + ...rableCast1Test(Firebird.5.LinqService).sql | 9 + ...rableCast2Test(Firebird.5.LinqService).sql | 11 + ...tainsAsyncTest(Firebird.5.LinqService).sql | 16 + ...FirstAsyncTest(Firebird.5.LinqService).sql | 15 + ...s.TakeSkipTest(Firebird.5.LinqService).sql | 16 + ...FirstOrDefault(Firebird.5.LinqService).sql | 20 + ...ookupAsyncTest(Firebird.5.LinqService).sql | 21 + ...ementAsyncTest(Firebird.5.LinqService).sql | 21 + ...s.AnyTestAsync(Firebird.5.LinqService).sql | 32 ++ ....AnyTestAsync2(Firebird.5.LinqService).sql | 32 ++ ...ethoAsyncdTest(Firebird.5.LinqService).sql | 16 + ...iledTest3Async(Firebird.5.LinqService).sql | 28 + ...tainsTestAsync(Firebird.5.LinqService).sql | 32 ++ ...CountTestAsync(Firebird.5.LinqService).sql | 24 + ...ountTestAsync2(Firebird.5.LinqService).sql | 24 + ...mentTestAsync1(Firebird.5.LinqService).sql | 28 + ...mentTestAsync2(Firebird.5.LinqService).sql | 28 + ...s.MaxTestAsync(Firebird.5.LinqService).sql | 24 + ....MaxTestAsync2(Firebird.5.LinqService).sql | 24 + ...PredicateAsync(Firebird.5.LinqService).sql | 183 +------ ...PredicateAsync(Firebird.5.LinqService).sql | 179 +----- ...PredicateAsync(Firebird.5.LinqService).sql | 181 +------ ...PredicateAsync(Firebird.5.LinqService).sql | 181 +------ ...PredicateAsync(Firebird.5.LinqService).sql | 179 +----- ...xSelectorAsync(Firebird.5.LinqService).sql | 179 +----- ...nSelectorAsync(Firebird.5.LinqService).sql | 179 +----- ...PredicateAsync(Firebird.5.LinqService).sql | 181 +------ ...PredicateAsync(Firebird.5.LinqService).sql | 181 +------ ...s.Concat1Async(Firebird.5.LinqService).sql | 19 + ...IncrementAsync(Firebird.5.LinqService).sql | 97 ++++ ...tFilteredAsync(Firebird.5.LinqService).sql | 80 +++ ...ts.Count1Async(Firebird.5.LinqService).sql | 8 + ...ts.Count2Async(Firebird.5.LinqService).sql | 10 + ...QueryMax1Async(Firebird.5.LinqService).sql | 16 + ...ests.Issue4602(Firebird.5.LinqService).sql | 110 +--- ...ssue4057_Async(Firebird.5.LinqService).sql | 31 ++ ...citTransaction(Firebird.5.LinqService).sql | 31 ++ ...xpressionAsync(Firebird.5.LinqService).sql | 25 + ...sts.Cast1Async(Firebird.5.LinqService).sql | 11 + ...ts.Test18Async(Firebird.5.LinqService).sql | 14 + ...arameter1Async(Firebird.5.LinqService).sql | 7 + ....Issue3132Test(Firebird.5.LinqService).sql | 213 ++++++++ ...At2Async(Firebird.5.LinqService,False).sql | 16 + ...tAt2Async(Firebird.5.LinqService,True).sql | 16 + ...lt3Async(Firebird.5.LinqService,False).sql | 16 + ...ult3Async(Firebird.5.LinqService,True).sql | 16 + ...ipleSkip1Async(Firebird.5.LinqService).sql | 94 +--- ...ke1Async(Firebird.5.LinqService,False).sql | 20 + ...ake1Async(Firebird.5.LinqService,True).sql | 24 + ...ke2Async(Firebird.5.LinqService,False).sql | 12 + ...ake2Async(Firebird.5.LinqService,True).sql | 12 + ...ke3Async(Firebird.5.LinqService,False).sql | 12 + ...ake3Async(Firebird.5.LinqService,True).sql | 14 + ...ke4Async(Firebird.5.LinqService,False).sql | 12 + ...ake4Async(Firebird.5.LinqService,True).sql | 14 + ...ke5Async(Firebird.5.LinqService,False).sql | 10 + ...ake5Async(Firebird.5.LinqService,True).sql | 12 + ...ebird.5.LinqService,False,False,False).sql | 19 + ...rebird.5.LinqService,False,False,True).sql | 19 + ...rebird.5.LinqService,False,True,False).sql | 19 + ...irebird.5.LinqService,False,True,True).sql | 19 + ...rebird.5.LinqService,True,False,False).sql | 19 + ...irebird.5.LinqService,True,False,True).sql | 19 + ...irebird.5.LinqService,True,True,False).sql | 19 + ...Firebird.5.LinqService,True,True,True).sql | 19 + ...ateTable1Async(Firebird.5.LinqService).sql | 59 ++ ...eateTableAsync(Firebird.5.LinqService).sql | 41 ++ ...TableNameAsync(Firebird.5.LinqService).sql | 114 ++++ ...tAsyncTest(Firebird.5.LinqService,100).sql | 20 + ...tAsyncTest(Firebird.5.LinqService,200).sql | 20 + ...yAsyncTest(Firebird.5.LinqService,100).sql | 14 + ...yAsyncTest(Firebird.5.LinqService,200).sql | 14 + ...yAsyncTest(Firebird.5.LinqService,100).sql | 11 + ...yAsyncTest(Firebird.5.LinqService,200).sql | 11 + ...s.Insert2Async(Firebird.5.LinqService).sql | 44 ++ ...s.Insert3Async(Firebird.5.LinqService).sql | 46 ++ ...s.Insert4Async(Firebird.5.LinqService).sql | 46 ++ ...TableNameAsync(Firebird.5.LinqService).sql | 94 ++++ ...rReplace1Async(Firebird.5.LinqService).sql | 98 ++++ ...TableNameAsync(Firebird.5.LinqService).sql | 155 ++++++ ...OrUpdate3Async(Firebird.5.LinqService).sql | 98 ++++ ...rUpdate3xAsync(Firebird.5.LinqService).sql | 104 ++++ ...Identity1Async(Firebird.5.LinqService).sql | 15 + ...Identity2Async(Firebird.5.LinqService).sql | 15 + ...Identity4Async(Firebird.5.LinqService).sql | 34 ++ ...yTestAsync(Firebird.5.LinqService,100).sql | 24 + ...yTestAsync(Firebird.5.LinqService,200).sql | 24 + ...outActionAsync(Firebird.5.LinqService).sql | 52 ++ ...tFromQueryAsyn(Firebird.5.LinqService).sql | 39 ++ ...tFromTableAsyn(Firebird.5.LinqService).sql | 37 ++ ....Update12Async(Firebird.5.LinqService).sql | 28 + ...s.Update1Async(Firebird.5.LinqService).sql | 54 ++ ...s.Update2Async(Firebird.5.LinqService).sql | 54 ++ ...s.Update4Async(Firebird.5.LinqService).sql | 63 +++ ...ociation1Async(Firebird.5.LinqService).sql | 47 ++ ...ation1AsyncOld(Firebird.5.LinqService).sql | 47 ++ ...TableNameAsync(Firebird.5.LinqService).sql | 132 +++++ ...eComplex1Async(Firebird.5.LinqService).sql | 57 ++ ...utputTestAsync(Firebird.5.LinqService).sql | 509 ++---------------- ...lternateUpdate(Firebird.5.LinqService).sql | 505 ++--------------- ...lternateUpdate(Firebird.5.LinqService).sql | 504 ++--------------- ...utputTestAsync(Firebird.5.LinqService).sql | 509 ++---------------- ...lternateUpdate(Firebird.5.LinqService).sql | 505 ++--------------- ...lternateUpdate(Firebird.5.LinqService).sql | 504 ++--------------- ...utputTestAsync(Firebird.5.LinqService).sql | 243 +-------- ...utputTestAsync(Firebird.5.LinqService).sql | 239 +------- ...syncWithoutOld(Firebird.5.LinqService).sql | 238 +------- ...utputTestAsync(Firebird.5.LinqService).sql | 244 +-------- ...utputTestAsync(Firebird.5.LinqService).sql | 240 +-------- ...syncWithoutOld(Firebird.5.LinqService).sql | 239 +------- ...Tests.Linq.AsyncTests.Test(Firebird.5).sql | 18 + ...ests.Linq.AsyncTests.Test1(Firebird.5).sql | 9 + ...inq.AsyncTests.TestForEach(Firebird.5).sql | 9 + 117 files changed, 3655 insertions(+), 5803 deletions(-) create mode 100644 Firebird.5.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.5.LinqService,False).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.5.LinqService,True).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.5.LinqService,False).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.5.LinqService,True).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.5.LinqService,False).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.5.LinqService,True).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.5.LinqService,False).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.5.LinqService,True).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.5.LinqService,False).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.5.LinqService,True).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.5.LinqService,False).sql create mode 100644 Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.5.LinqService,True).sql create mode 100644 Firebird.5.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.5.LinqService).sql create mode 100644 Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.5.LinqService).sql create mode 100644 Firebird.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.5).sql create mode 100644 Firebird.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.5).sql create mode 100644 Firebird.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.5).sql diff --git a/Firebird.5.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..6f24296a7565 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.5.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" <= 3 + ) +FROM rdb$database + diff --git a/Firebird.5.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..5f51b57ab3c1 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.5.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT DISTINCT + "a_Parent1"."ParentID" + FROM + "Child" "t1" + INNER JOIN "Parent" "a_Parent1" ON "t1"."ParentID" = "a_Parent1"."ParentID" + ) "m_1" + INNER JOIN "Child" "d" + INNER JOIN "Parent" "a_Parent1_1" ON "d"."ParentID" = "a_Parent1_1"."ParentID" + ON "m_1"."ParentID" = "a_Parent1_1"."ParentID" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "a_Parent1"."ParentID" +FROM + "Child" "t1" + INNER JOIN "Parent" "a_Parent1" ON "t1"."ParentID" = "a_Parent1"."ParentID" +GROUP BY + "a_Parent1"."ParentID" + diff --git a/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..89f7b2bcb1e0 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.5.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..d82cff288e5e --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.5.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" > 1 + diff --git a/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..89f7b2bcb1e0 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.5.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..d82cff288e5e --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.5.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" > 1 + diff --git a/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..7eae1533305f --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.5.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Person" "t1" + WHERE + CAST(@ID AS Int) = "t1"."PersonID" + ) +FROM rdb$database + diff --git a/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..615fb49d8b2b --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.5.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."PersonID" = 1 +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.5.LinqService).sql index 59e68d1f25b2..47bbc4d7fa9b 100644 --- a/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.5.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY "t1"."ParentID" OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @skip Integer -- Int32 +SET @skip = 1 +DECLARE @take Integer -- Int32 +SET @take = 2 + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" +ORDER BY + "t1"."ParentID" +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..2a2009da04f2 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.5.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer -- Int32 +SET @p_2 = 3 +DECLARE @param Integer -- Int32 +SET @param = 4 + +SELECT + "o"."ParentID", + "o"."Value1" +FROM + "Parent" "o" +WHERE + "o"."ParentID" IN (@p, @p_1, @p_2) OR "o"."ParentID" = @param +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..16e349713c09 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.5.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +ORDER BY + "t1"."ParentID", + "t1"."ChildID" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..16e349713c09 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.5.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +ORDER BY + "t1"."ParentID", + "t1"."ChildID" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..ecc176c90471 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.5.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) +FROM rdb$database + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) +FROM rdb$database + diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..ecc176c90471 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.5.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) +FROM rdb$database + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) +FROM rdb$database + diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..241f0c5ef65b --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.5.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = @p +ORDER BY + "x"."ParentID" DESC +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..2f9521bcc6c8 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.5.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT @p ROWS ONLY + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT @p ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..6345daf2c636 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.5.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + CAST(@p AS Int) = "c_1"."ParentID" + ) +FROM rdb$database + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + CAST(@p AS Int) = "c_1"."ParentID" + ) +FROM rdb$database + diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..d230dfbe20fc --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.5.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..d230dfbe20fc --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.5.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..31e769e8147b --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.5.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..31e769e8147b --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.5.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..e73cdc9107d3 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.5.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..e73cdc9107d3 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.5.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.5.LinqService).sql index d08965cbb512..8fa8fbbb4e99 100644 --- a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.5.LinqService).sql @@ -1,171 +1,16 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + "AsyncDataTable" "c_1" + WHERE + "c_1"."Id" = @p + ) +FROM rdb$database diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.5.LinqService).sql index d08965cbb512..8cea6093552a 100644 --- a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.5.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = @p diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.5.LinqService).sql index d08965cbb512..c32ac5b96c89 100644 --- a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.5.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 1 ROWS ONLY diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.5.LinqService).sql index d08965cbb512..c32ac5b96c89 100644 --- a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.5.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 1 ROWS ONLY diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.5.LinqService).sql index d08965cbb512..8cea6093552a 100644 --- a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.5.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = @p diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.5.LinqService).sql index d08965cbb512..be340897ab8e 100644 --- a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.5.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MAX("c_1"."Id") +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" > @p diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.5.LinqService).sql index d08965cbb512..4533ace3a73e 100644 --- a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.5.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MIN("c_1"."Id") +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" > @p diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.5.LinqService).sql index d08965cbb512..9b360072f492 100644 --- a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.5.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 2 ROWS ONLY diff --git a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.5.LinqService).sql index d08965cbb512..9b360072f492 100644 --- a/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.5.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 2 ROWS ONLY diff --git a/Firebird.5.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..c69ddc85b95f --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.5.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" = 1 +UNION ALL +SELECT + "p_1"."ParentID", + "p_1"."Value1" +FROM + "Parent" "p_1" +WHERE + "p_1"."ParentID" = 2 + diff --git a/Firebird.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.5.LinqService).sql index 51ca994a3df9..e25b1c2261cf 100644 --- a/Firebird.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.5.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Firebird.5 Firebird4 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.5 Firebird4 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.5 Firebird4 @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.5 Firebird4 @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" "obj" +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.5 Firebird4 @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" "obj" +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.5 Firebird4 diff --git a/Firebird.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.5.LinqService).sql index 29ced0535d9f..1ec3f26c41ec 100644 --- a/Firebird.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.5.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Firebird.5 Firebird4 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" "r" +SET + "Stamp" = "r"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "r"."Id" = 2 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.5 Firebird4 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" "r" +SET + "Stamp" = "r"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "r"."Id" = 1 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.5 Firebird4 @@ -28,6 +84,18 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" "r" +WHERE + "r"."Id" = 2 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.5 Firebird4 @@ -38,6 +106,18 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" "r" +WHERE + "r"."Id" = 1 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.5 Firebird4 diff --git a/Firebird.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..281f3f4c13d6 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.5.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" "t1" + diff --git a/Firebird.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..3e5d98528116 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.5.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 2 + diff --git a/Firebird.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..a6a1321fab3e --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.5.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" "c_1" + LEFT JOIN "Parent" "a_Parent" ON "c_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "a_Parent"."ParentID" = "t1"."ParentID" + )) +FROM + "Parent" "t1" + diff --git a/Firebird.5.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.5.LinqService).sql index 5b90aa3e8ec8..1ad4d47496ac 100644 --- a/Firebird.5.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.5.LinqService).sql @@ -1,103 +1,11 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicParent"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicParent')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DynamicParent" - ( - ID Int NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY (ID) - ) - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT ' - CREATE GENERATOR "GIDENTITY_DynamicParent" - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT ' - CREATE TRIGGER "TIDENTITY_DynamicParent" FOR "DynamicParent" - BEFORE INSERT POSITION 0 - AS BEGIN - NEW.ID = GEN_ID("GIDENTITY_DynamicParent", 1); - END - '; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicChild"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicChild')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DynamicChild" - ( - ID Int NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY (ID) - ) - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT ' - CREATE GENERATOR "GIDENTITY_DynamicChild" - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT ' - CREATE TRIGGER "TIDENTITY_DynamicChild" FOR "DynamicChild" - BEFORE INSERT POSITION 0 - AS BEGIN - NEW.ID = GEN_ID("GIDENTITY_DynamicChild", 1); - END - '; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicChild"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicParent"'; -END +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "it".ID +FROM + "DynamicParent" "it" + LEFT JOIN "DynamicChild" "a_Child" ON "it".ID = "a_Child"."ParentID" +WHERE + "a_Child".ID = 123 diff --git a/Firebird.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.5.LinqService).sql index 6f6a86551e40..d054878cbc42 100644 --- a/Firebird.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.5.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT + "x"."ParentID" + FROM + "Parent" "x" + WHERE + "x"."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) "m_1" + INNER JOIN "Child" "d" ON "m_1"."ParentID" = "d"."ParentID" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- Firebird.5 Firebird4 (asynchronously) diff --git a/Firebird.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.5.LinqService).sql index 55adad71a6d6..3ac11b44d5f6 100644 --- a/Firebird.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.5.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT + "x"."ParentID" + FROM + "Parent" "x" + WHERE + "x"."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) "m_1" + INNER JOIN "Child" "d" ON "m_1"."ParentID" = "d"."ParentID" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransaction BeforeExecute -- Firebird.5 Firebird4 (asynchronously) diff --git a/Firebird.5.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..a2523a1c3f86 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.5.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" "a_Children" + INNER JOIN "GrandChild" "a_GrandChildren" ON "a_Children"."ParentID" = "a_GrandChildren"."ParentID" AND "a_Children"."ChildID" = "a_GrandChildren"."ChildID" + WHERE + "p"."ParentID" = "a_Children"."ParentID" + ) +FROM + "Parent" "p" + diff --git a/Firebird.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..4333f17325d0 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.5.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" +WHERE + "t1"."Value1" = 1 + diff --git a/Firebird.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..4044a0081df0 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.5.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT DISTINCT + "p1"."PersonID", + "p1"."Gender", + "p1"."FirstName", + "p1"."LastName" +FROM + "Person" "p1" +WHERE + "p1"."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + "p1"."Gender" = 'F' + diff --git a/Firebird.5.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..d84324f8915e --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.5.LinqService).sql @@ -0,0 +1,7 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + 1 +FROM rdb$database + diff --git a/Firebird.5.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..c175d4ef530d --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.5.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "x"."MiddleName", + COUNT(*) +FROM + "Person" "x" +WHERE + "x"."MiddleName" IS NOT NULL +GROUP BY + "x"."MiddleName" +UNION ALL +SELECT + "x_1"."MiddleName", + COUNT(*) +FROM + "Person" "x_1" +WHERE + "x_1"."MiddleName" IS NOT NULL +GROUP BY + "x_1"."MiddleName" +UNION ALL +SELECT + "x_2"."MiddleName", + COUNT(*) +FROM + "Person" "x_2" +WHERE + "x_2"."MiddleName" IS NOT NULL +GROUP BY + "x_2"."MiddleName" +UNION ALL +SELECT + "x_3"."MiddleName", + COUNT(*) +FROM + "Person" "x_3" +WHERE + "x_3"."MiddleName" IS NOT NULL +GROUP BY + "x_3"."MiddleName" +UNION ALL +SELECT + "x_4"."MiddleName", + COUNT(*) +FROM + "Person" "x_4" +WHERE + "x_4"."MiddleName" IS NOT NULL +GROUP BY + "x_4"."MiddleName" +UNION ALL +SELECT + "x_5"."MiddleName", + COUNT(*) +FROM + "Person" "x_5" +WHERE + "x_5"."MiddleName" IS NOT NULL +GROUP BY + "x_5"."MiddleName" +UNION ALL +SELECT + "x_6"."MiddleName", + COUNT(*) +FROM + "Person" "x_6" +WHERE + "x_6"."MiddleName" IS NOT NULL +GROUP BY + "x_6"."MiddleName" +UNION ALL +SELECT + "x_7"."MiddleName", + COUNT(*) +FROM + "Person" "x_7" +WHERE + "x_7"."MiddleName" IS NOT NULL +GROUP BY + "x_7"."MiddleName" +UNION ALL +SELECT + "x_8"."MiddleName", + COUNT(*) +FROM + "Person" "x_8" +WHERE + "x_8"."MiddleName" IS NOT NULL +GROUP BY + "x_8"."MiddleName" +UNION ALL +SELECT + "x_9"."MiddleName", + COUNT(*) +FROM + "Person" "x_9" +WHERE + "x_9"."MiddleName" IS NOT NULL +GROUP BY + "x_9"."MiddleName" +UNION ALL +SELECT + "x_10"."MiddleName", + COUNT(*) +FROM + "Person" "x_10" +WHERE + "x_10"."MiddleName" IS NOT NULL +GROUP BY + "x_10"."MiddleName" +UNION ALL +SELECT + "x_11"."MiddleName", + COUNT(*) +FROM + "Person" "x_11" +WHERE + "x_11"."MiddleName" IS NOT NULL +GROUP BY + "x_11"."MiddleName" +UNION ALL +SELECT + "x_12"."MiddleName", + COUNT(*) +FROM + "Person" "x_12" +WHERE + "x_12"."MiddleName" IS NOT NULL +GROUP BY + "x_12"."MiddleName" +UNION ALL +SELECT + "x_13"."MiddleName", + COUNT(*) +FROM + "Person" "x_13" +WHERE + "x_13"."MiddleName" IS NOT NULL +GROUP BY + "x_13"."MiddleName" +UNION ALL +SELECT + "x_14"."MiddleName", + COUNT(*) +FROM + "Person" "x_14" +WHERE + "x_14"."MiddleName" IS NOT NULL +GROUP BY + "x_14"."MiddleName" +UNION ALL +SELECT + "x_15"."MiddleName", + COUNT(*) +FROM + "Person" "x_15" +WHERE + "x_15"."MiddleName" IS NOT NULL +GROUP BY + "x_15"."MiddleName" +UNION ALL +SELECT + "x_16"."MiddleName", + COUNT(*) +FROM + "Person" "x_16" +WHERE + "x_16"."MiddleName" IS NOT NULL +GROUP BY + "x_16"."MiddleName" +UNION ALL +SELECT + "x_17"."MiddleName", + COUNT(*) +FROM + "Person" "x_17" +WHERE + "x_17"."MiddleName" IS NOT NULL +GROUP BY + "x_17"."MiddleName" +UNION ALL +SELECT + "x_18"."MiddleName", + COUNT(*) +FROM + "Person" "x_18" +WHERE + "x_18"."MiddleName" IS NOT NULL +GROUP BY + "x_18"."MiddleName" +UNION ALL +SELECT + "x_19"."MiddleName", + COUNT(*) +FROM + "Person" "x_19" +WHERE + "x_19"."MiddleName" IS NOT NULL +GROUP BY + "x_19"."MiddleName" +UNION ALL +SELECT + "x_20"."MiddleName", + COUNT(*) +FROM + "Person" "x_20" +WHERE + "x_20"."MiddleName" IS NOT NULL +GROUP BY + "x_20"."MiddleName" + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.5.LinqService,False).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.5.LinqService,False).sql new file mode 100644 index 000000000000..cc600f4ca320 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.5.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.5.LinqService,True).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.5.LinqService,True).sql new file mode 100644 index 000000000000..cc600f4ca320 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.5.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.5.LinqService,False).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.5.LinqService,False).sql new file mode 100644 index 000000000000..cc600f4ca320 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.5.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.5.LinqService,True).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.5.LinqService,True).sql new file mode 100644 index 000000000000..cc600f4ca320 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.5.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.5.LinqService).sql index 9dfbcece443d..50de77b481df 100644 --- a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.5.LinqService).sql @@ -1,85 +1,13 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TakeSkipClass')) THEN - EXECUTE STATEMENT 'DROP TABLE "TakeSkipClass"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TakeSkipClass')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TakeSkipClass" - ( - "Value" VarChar(10) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Value VarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Value VarChar(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Value VarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Value VarChar(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TakeSkipClass')) THEN - EXECUTE STATEMENT 'DROP TABLE "TakeSkipClass"'; -END +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @skip Integer -- Int32 +SET @skip = 3 + +SELECT + "t1"."Value" +FROM + "TakeSkipClass" "t1" +ORDER BY + "t1"."Value" +OFFSET @skip ROWS diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.5.LinqService,False).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.5.LinqService,False).sql index 433ef6fce722..41d5536043d8 100644 --- a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.5.LinqService,False).sql +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.5.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" "ch" FETCH NEXT 3 ROWS ONLY +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT 3 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.5.LinqService,True).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.5.LinqService,True).sql index b757042ee13a..dea5ffbe28aa 100644 --- a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.5.LinqService,True).sql +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.5.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" "ch" FETCH NEXT @take ROWS ONLY +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT @take ROWS ONLY + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.5.LinqService,False).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.5.LinqService,False).sql new file mode 100644 index 000000000000..49a946aff9ba --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.5.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT @n ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.5.LinqService,True).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.5.LinqService,True).sql new file mode 100644 index 000000000000..49a946aff9ba --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.5.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT @n ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.5.LinqService,False).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.5.LinqService,False).sql new file mode 100644 index 000000000000..6ded12787f4e --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.5.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" > 3 OR "ch"."ChildID" < 4 +FETCH NEXT 3 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.5.LinqService,True).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.5.LinqService,True).sql new file mode 100644 index 000000000000..b1d03571cad9 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.5.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" > 3 OR "ch"."ChildID" < 4 +FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.5.LinqService,False).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.5.LinqService,False).sql new file mode 100644 index 000000000000..09e96674d454 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.5.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" >= 0 AND "ch"."ChildID" <= 100 +FETCH NEXT 3 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.5.LinqService,True).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.5.LinqService,True).sql new file mode 100644 index 000000000000..f0d4ad2a0f48 --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.5.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" >= 0 AND "ch"."ChildID" <= 100 +FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.5.LinqService,False).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.5.LinqService,False).sql new file mode 100644 index 000000000000..1ae4f5a5e9eb --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.5.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT 3 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.5.LinqService,True).sql b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.5.LinqService,True).sql new file mode 100644 index 000000000000..a8dd8f37be9a --- /dev/null +++ b/Firebird.5.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.5.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,False,False).sql b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,False,False).sql index 78f451d0d425..c56e3fcd9885 100644 --- a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,False,False).sql +++ b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,False,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,False,True).sql b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,False,True).sql index 78f451d0d425..c56e3fcd9885 100644 --- a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,False,True).sql +++ b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,False,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,True,False).sql b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,True,False).sql index 78f451d0d425..c56e3fcd9885 100644 --- a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,True,False).sql +++ b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,True,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,True,True).sql b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,True,True).sql index 78f451d0d425..c56e3fcd9885 100644 --- a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,True,True).sql +++ b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,False,True,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,False,False).sql b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,False,False).sql index 78f451d0d425..c56e3fcd9885 100644 --- a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,False,False).sql +++ b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,False,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,False,True).sql b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,False,True).sql index 78f451d0d425..c56e3fcd9885 100644 --- a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,False,True).sql +++ b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,False,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,True,False).sql b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,True,False).sql index 78f451d0d425..c56e3fcd9885 100644 --- a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,True,False).sql +++ b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,True,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,True,True).sql b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,True,True).sql index 78f451d0d425..c56e3fcd9885 100644 --- a/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,True,True).sql +++ b/Firebird.5.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.5.LinqService,True,True,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.5.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..81ac15237a4d --- /dev/null +++ b/Firebird.5.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.5.LinqService).sql @@ -0,0 +1,59 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_TestTable')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_TestTable"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_TestTable')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_TestTable"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TestTable')) THEN + EXECUTE STATEMENT 'DROP TABLE "TestTable"'; +END + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "TestTable" + ( + ID Int NOT NULL, + "Field1" VarChar(50) CHARACTER SET UNICODE_FSS, + "Field2" VarChar(255) CHARACTER SET UNICODE_FSS, + "CreatedOn" TimeStamp, + + CONSTRAINT "PK_TestTable" PRIMARY KEY (ID) + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_TestTable" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_TestTable" FOR "TestTable" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW.ID = GEN_ID("GIDENTITY_TestTable", 1); + END + '; +END + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1".ID, + "t1"."Field1", + "t1"."Field2", + "t1"."CreatedOn" +FROM + "TestTable" "t1" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_TestTable"'; + EXECUTE STATEMENT 'DROP TABLE "TestTable"'; +END + diff --git a/Firebird.5.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.5.LinqService).sql index 7c4291e74ec7..af92a214e1aa 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.5.LinqService).sql @@ -1,4 +1,37 @@ BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TempTable')) THEN + EXECUTE STATEMENT 'DROP TABLE "TempTable"'; +END + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TempTable')) THEN + EXECUTE STATEMENT ' + CREATE TABLE "TempTable" + ( + ID Int NOT NULL + ) + '; +END + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +INSERT INTO "TempTable" +( + ID +) +SELECT + "p"."ParentID" +FROM + "Parent" "p" + +BeforeExecute -- Firebird.5 Firebird4 SELECT @@ -7,3 +40,11 @@ FROM "Parent" "p" INNER JOIN "TempTable" "t" ON "p"."ParentID" = "t".ID +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TempTable')) THEN + EXECUTE STATEMENT 'DROP TABLE "TempTable"'; +END + diff --git a/Firebird.5.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..108d04263973 --- /dev/null +++ b/Firebird.5.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.5.LinqService).sql @@ -0,0 +1,114 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_xxPerson_fl_30')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_30"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_xxPerson_fl_30')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_30"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPerson_fl_30')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_30"'; +END + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "xxPerson_fl_30" + ( + "FirstName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "MiddleName" VarChar(255) CHARACTER SET UNICODE_FSS, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_fl_30" PRIMARY KEY ("PersonID") + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_xxPerson_fl_30" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_xxPerson_fl_30" FOR "xxPerson_fl_30" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW."PersonID" = GEN_ID("GIDENTITY_xxPerson_fl_30", 1); + END + '; +END + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson_fl_30" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_30" "t1" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson_fl_30" "t1" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson_fl_30" "t1" +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_30" "t1" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_30"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_30"'; + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_30"'; +END + diff --git a/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(Firebird.5.LinqService,100).sql b/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(Firebird.5.LinqService,100).sql index 6a05702b28bc..77d131e4c13e 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(Firebird.5.LinqService,100).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(Firebird.5.LinqService,100).sql @@ -10,3 +10,23 @@ FROM WHERE "s"."Id" > 3 +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" > 3 +RETURNING + "s"."Id", + "s"."Value", + "s"."ValueStr" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN + EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; +END + diff --git a/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(Firebird.5.LinqService,200).sql b/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(Firebird.5.LinqService,200).sql index 6a05702b28bc..77d131e4c13e 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(Firebird.5.LinqService,200).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(Firebird.5.LinqService,200).sql @@ -10,3 +10,23 @@ FROM WHERE "s"."Id" > 3 +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" > 3 +RETURNING + "s"."Id", + "s"."Value", + "s"."ValueStr" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN + EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; +END + diff --git a/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(Firebird.5.LinqService,100).sql b/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(Firebird.5.LinqService,100).sql index 6a05702b28bc..547826a1898b 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(Firebird.5.LinqService,100).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(Firebird.5.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE "s"."Id" > 3 +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" > 3 +RETURNING + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(Firebird.5.LinqService,200).sql b/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(Firebird.5.LinqService,200).sql index 6a05702b28bc..76dc6f5f195f 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(Firebird.5.LinqService,200).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(Firebird.5.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE "s"."Id" > 3 +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" > 3 +RETURNING + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(Firebird.5.LinqService,100).sql b/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(Firebird.5.LinqService,100).sql index 6a05702b28bc..b8294cb8ae46 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(Firebird.5.LinqService,100).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(Firebird.5.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE "s"."Id" > 3 +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" > 3 +RETURNING + "s"."Id" + 1, + "s"."ValueStr" || CAST(1 AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(Firebird.5.LinqService,200).sql b/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(Firebird.5.LinqService,200).sql index 6a05702b28bc..b8294cb8ae46 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(Firebird.5.LinqService,200).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(Firebird.5.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE "s"."Id" > 3 +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" > 3 +RETURNING + "s"."Id" + 1, + "s"."ValueStr" || CAST(1 AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..901721cbba62 --- /dev/null +++ b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.5.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..438dc4c0a744 --- /dev/null +++ b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.5.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + "c_1"."ParentID", + CAST(@id AS Int) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = 11 + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..438dc4c0a744 --- /dev/null +++ b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.5.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + "c_1"."ParentID", + CAST(@id AS Int) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = 11 + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.5.LinqService).sql index c4d0f567aeff..b56fd5301132 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.5.LinqService).sql @@ -1,5 +1,59 @@ BeforeExecute -- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "xxPerson_fl_31" + ( + "FirstName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "MiddleName" VarChar(255) CHARACTER SET UNICODE_FSS, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_fl_31" PRIMARY KEY ("PersonID") + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_xxPerson_fl_31" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_xxPerson_fl_31" FOR "xxPerson_fl_31" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW."PersonID" = GEN_ID("GIDENTITY_xxPerson_fl_31", 1); + END + '; +END + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson_fl_31" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) DECLARE @FirstName VarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName VarChar(4) -- String @@ -58,3 +112,43 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_31" "t1" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_31" "p" +WHERE + "p"."FirstName" = 'Steven' AND "p"."LastName" = 'King' AND + "p"."Gender" = 'M' + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_31"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_31"'; + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_31"'; +END + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_xxPerson_fl_31')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_31"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_xxPerson_fl_31')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_31"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPerson_fl_31')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_31"'; +END + diff --git a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.5.LinqService).sql index 04c09db5a1d2..b4333814cbfd 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.5.LinqService).sql @@ -33,3 +33,101 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc0' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc1' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc2' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id +FETCH NEXT 2 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..e27708ff3f7f --- /dev/null +++ b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.5.LinqService).sql @@ -0,0 +1,155 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPatient21')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPatient21"'; +END + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +CREATE TABLE "xxPatient21" +( + "PersonID" Int NOT NULL, + "Diagnosis" VarChar(255) CHARACTER SET UNICODE_FSS, + + CONSTRAINT "PK_xxPatient21" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient21" "t1" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient21" "t1" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPatient21')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPatient21"'; +END + diff --git a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.5.LinqService).sql index 04c09db5a1d2..7a9affdd7eb0 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.5.LinqService).sql @@ -33,3 +33,101 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id +FETCH NEXT 2 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.5.LinqService).sql index 04c09db5a1d2..538b224a498d 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.5.LinqService).sql @@ -33,3 +33,107 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 +DECLARE @id Integer -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 +DECLARE @id Integer -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 +DECLARE @id Integer -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id +FETCH NEXT 2 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.5.LinqService).sql index 2ecaf39e1571..9e1503d34746 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.5.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = 'John' AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Firebird.5 Firebird4 diff --git a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.5.LinqService).sql index 2ecaf39e1571..9e1503d34746 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.5.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = 'John' AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Firebird.5 Firebird4 diff --git a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.5.LinqService).sql index 33241b466bf7..27e083509779 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.5.LinqService).sql @@ -36,6 +36,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John0' + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = @p AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Firebird.5 Firebird4 (asynchronously) DECLARE @FirstName VarChar(5) -- String @@ -66,6 +83,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John1' + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = @p AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Firebird.5 Firebird4 diff --git a/Firebird.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(Firebird.5.LinqService,100).sql b/Firebird.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(Firebird.5.LinqService,100).sql index 4a15361056cd..40f78e027661 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(Firebird.5.LinqService,100).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(Firebird.5.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) +FROM + "TableWithData" "s" +WHERE + "s"."Id" > 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- Firebird.5 Firebird4 DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/Firebird.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(Firebird.5.LinqService,200).sql b/Firebird.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(Firebird.5.LinqService,200).sql index fd9361d7c21d..478f3a98f622 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(Firebird.5.LinqService,200).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(Firebird.5.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) +FROM + "TableWithData" "s" +WHERE + "s"."Id" > 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- Firebird.5 Firebird4 DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/Firebird.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(Firebird.5.LinqService).sql index b63512e036e3..29ecc7ead52e 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(Firebird.5.LinqService).sql @@ -218,3 +218,55 @@ VALUES @Field4 ) +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" + WHERE + "t1"."Id" = 5 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) +RETURNING + OLD."Id", + OLD."Field1", + OLD."Field2", + OLD."Field3", + OLD."Field4", + OLD."Field5", + NEW."Id", + NEW."Field1", + NEW."Field2", + NEW."Field3", + NEW."Field4", + NEW."Field5" + diff --git a/Firebird.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.5.LinqService).sql index 271a1e5e6996..4a48e31dc170 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.5.LinqService).sql @@ -218,6 +218,45 @@ VALUES @Field4 ) +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" + WHERE + "t1"."Id" = 5 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Firebird.5 Firebird4 diff --git a/Firebird.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.5.LinqService).sql index 271a1e5e6996..ff517cb43408 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.5.LinqService).sql @@ -218,6 +218,43 @@ VALUES @Field4 ) +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Firebird.5 Firebird4 diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..6af1923d429c --- /dev/null +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.5.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = ( + SELECT + "p2_1"."ParentID" + FROM + "Parent" "p1_1" + INNER JOIN "Parent" "p2_1" ON "p1_1"."ParentID" = "p2_1"."ParentID" + WHERE + "p1_1"."ParentID" < 3 AND "Parent"."ParentID" = "p1_1"."ParentID" AND + ("Parent"."Value1" = "p1_1"."Value1" OR "Parent"."Value1" IS NULL AND "p1_1"."Value1" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "Parent" "p1" + INNER JOIN "Parent" "p2" ON "p1"."ParentID" = "p2"."ParentID" + WHERE + "p1"."ParentID" < 3 AND "Parent"."ParentID" = "p1"."ParentID" AND + ("Parent"."Value1" = "p1"."Value1" OR "Parent"."Value1" IS NULL AND "p1"."Value1" IS NULL) + ) + diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..ffcec04350be --- /dev/null +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.5.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" "p" +SET + "ParentID" = "p"."ParentID" + 1 +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @p + diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..ffcec04350be --- /dev/null +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.5.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" "p" +SET + "ParentID" = "p"."ParentID" + 1 +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @p + diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..77038f303768 --- /dev/null +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.5.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "c_1" + LEFT JOIN "Parent" "a_Parent" ON "c_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "c_1"."ChildID" = @id AND + "a_Parent"."Value1" = 1 AND + "Child"."ParentID" = "c_1"."ParentID" AND + "Child"."ChildID" = "c_1"."ChildID" + ) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @p + diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..1fbfbd9eb1e2 --- /dev/null +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.5.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "child_1" + LEFT JOIN "Parent" "a_Parent" ON "child_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "child_1"."ChildID" = 10000 AND "Parent"."ParentID" = "a_Parent"."ParentID" AND + ("Parent"."Value1" = "a_Parent"."Value1" OR "Parent"."Value1" IS NULL AND "a_Parent"."Value1" IS NULL) + ) + diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..1fbfbd9eb1e2 --- /dev/null +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.5.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "child_1" + LEFT JOIN "Parent" "a_Parent" ON "child_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "child_1"."ChildID" = 10000 AND "Parent"."ParentID" = "a_Parent"."ParentID" AND + ("Parent"."Value1" = "a_Parent"."Value1" OR "Parent"."Value1" IS NULL AND "a_Parent"."Value1" IS NULL) + ) + diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.5.LinqService).sql new file mode 100644 index 000000000000..4e04e6d4c6c2 --- /dev/null +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.5.LinqService).sql @@ -0,0 +1,132 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_xxPerson_fl_33')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_33"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_xxPerson_fl_33')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_33"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPerson_fl_33')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_33"'; +END + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "xxPerson_fl_33" + ( + "FirstName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "MiddleName" VarChar(255) CHARACTER SET UNICODE_FSS, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_fl_33" PRIMARY KEY ("PersonID") + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_xxPerson_fl_33" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_xxPerson_fl_33" FOR "xxPerson_fl_33" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW."PersonID" = GEN_ID("GIDENTITY_xxPerson_fl_33", 1); + END + '; +END + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson_fl_33" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_33" "t1" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson_fl_33" "t1" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +UPDATE + "xxPerson_fl_33" "t1" +SET + "FirstName" = CAST(@FirstName AS VARCHAR(6)), + "LastName" = CAST(@LastName AS VARCHAR(4)), + "MiddleName" = CAST(@MiddleName AS VARCHAR(4)), + "Gender" = CAST(@Gender AS Char(1)) +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson_fl_33" "t1" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_33"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_33"'; + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_33"'; +END + diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.5.LinqService).sql index d104d07b6809..3d1176163426 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.5.LinqService).sql @@ -35,3 +35,60 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 6 + +SELECT + "t1"."PersonID", + "t1"."Gender", + "t1"."FirstName", + "t1"."MiddleName", + "t1"."LastName" +FROM + "Person" "t1" +WHERE + "t1"."PersonID" = @id +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName VarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName VarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName VarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer -- Int32 +SET @ID = 6 + +UPDATE + "Person" "t1" +SET + "Gender" = CAST(@Gender AS CHAR(1)), + "FirstName" = CAST(@Name_FirstName AS VARCHAR(13)), + "MiddleName" = CAST(@Name_MiddleName AS VARCHAR(1)), + "LastName" = CAST(@Name_LastName AS VARCHAR(13)) +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 6 + +SELECT + "t1"."PersonID", + "t1"."Gender", + "t1"."FirstName", + "t1"."MiddleName", + "t1"."LastName" +FROM + "Person" "t1" +WHERE + "t1"."PersonID" = @id +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(Firebird.5.LinqService).sql index c97108bcd430..a6cca27f5125 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(Firebird.5.LinqService).sql @@ -1,458 +1,55 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "s_1"."Id" + FROM + "TableWithData" "s_1" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "s_1"."Id" + WHERE + "DestinationTable"."Id" = "t_1"."Id" AND "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "s_2"."Value" + FROM + "TableWithData" "s_2" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "s_2"."Id" + WHERE + "DestinationTable"."Id" = "t_2"."Id" AND "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "s_3"."ValueStr" + FROM + "TableWithData" "s_3" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "s_3"."Id" + WHERE + "DestinationTable"."Id" = "t_3"."Id" AND "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "s" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "s"."Id" + WHERE + "DestinationTable"."Id" = "t"."Id" AND "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(Firebird.5.LinqService).sql index c97108bcd430..f9bc618d45b8 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(Firebird.5.LinqService).sql @@ -1,458 +1,51 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "s_1"."Id" + FROM + "TableWithData" "s_1" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "s_1"."Id" + WHERE + "DestinationTable"."Id" = "t_1"."Id" AND "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "s_2"."Value" + FROM + "TableWithData" "s_2" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "s_2"."Id" + WHERE + "DestinationTable"."Id" = "t_2"."Id" AND "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "s_3"."ValueStr" + FROM + "TableWithData" "s_3" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "s_3"."Id" + WHERE + "DestinationTable"."Id" = "t_3"."Id" AND "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "s" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "s"."Id" + WHERE + "DestinationTable"."Id" = "t"."Id" AND "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(Firebird.5.LinqService).sql index c97108bcd430..f7d2701adb47 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(Firebird.5.LinqService).sql @@ -1,458 +1,50 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "s_1"."Id" + FROM + "TableWithData" "s_1" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "s_1"."Id" + WHERE + "DestinationTable"."Id" = "t_1"."Id" AND "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "s_2"."Value" + FROM + "TableWithData" "s_2" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "s_2"."Id" + WHERE + "DestinationTable"."Id" = "t_2"."Id" AND "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "s_3"."ValueStr" + FROM + "TableWithData" "s_3" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "s_3"."Id" + WHERE + "DestinationTable"."Id" = "t_3"."Id" AND "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "s" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "s"."Id" + WHERE + "DestinationTable"."Id" = "t"."Id" AND "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + NEW."Value" diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(Firebird.5.LinqService).sql index c97108bcd430..a6cca27f5125 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(Firebird.5.LinqService).sql @@ -1,458 +1,55 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "s_1"."Id" + FROM + "TableWithData" "s_1" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "s_1"."Id" + WHERE + "DestinationTable"."Id" = "t_1"."Id" AND "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "s_2"."Value" + FROM + "TableWithData" "s_2" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "s_2"."Id" + WHERE + "DestinationTable"."Id" = "t_2"."Id" AND "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "s_3"."ValueStr" + FROM + "TableWithData" "s_3" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "s_3"."Id" + WHERE + "DestinationTable"."Id" = "t_3"."Id" AND "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "s" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "s"."Id" + WHERE + "DestinationTable"."Id" = "t"."Id" AND "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(Firebird.5.LinqService).sql index c97108bcd430..f9bc618d45b8 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(Firebird.5.LinqService).sql @@ -1,458 +1,51 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "s_1"."Id" + FROM + "TableWithData" "s_1" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "s_1"."Id" + WHERE + "DestinationTable"."Id" = "t_1"."Id" AND "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "s_2"."Value" + FROM + "TableWithData" "s_2" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "s_2"."Id" + WHERE + "DestinationTable"."Id" = "t_2"."Id" AND "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "s_3"."ValueStr" + FROM + "TableWithData" "s_3" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "s_3"."Id" + WHERE + "DestinationTable"."Id" = "t_3"."Id" AND "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "s" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "s"."Id" + WHERE + "DestinationTable"."Id" = "t"."Id" AND "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(Firebird.5.LinqService).sql index c97108bcd430..f7d2701adb47 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(Firebird.5.LinqService).sql @@ -1,458 +1,50 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "s_1"."Id" + FROM + "TableWithData" "s_1" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "s_1"."Id" + WHERE + "DestinationTable"."Id" = "t_1"."Id" AND "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "s_2"."Value" + FROM + "TableWithData" "s_2" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "s_2"."Id" + WHERE + "DestinationTable"."Id" = "t_2"."Id" AND "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "s_3"."ValueStr" + FROM + "TableWithData" "s_3" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "s_3"."Id" + WHERE + "DestinationTable"."Id" = "t_3"."Id" AND "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "s" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "s"."Id" + WHERE + "DestinationTable"."Id" = "t"."Id" AND "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + NEW."Value" diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(Firebird.5.LinqService).sql index 3b67f1a43332..71b53963a1b6 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(Firebird.5.LinqService).sql @@ -1,229 +1,18 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" > 3 +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(Firebird.5.LinqService).sql index 3b67f1a43332..14536bc7c7fa 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(Firebird.5.LinqService).sql @@ -1,229 +1,14 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" > 3 +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(Firebird.5.LinqService).sql index 3b67f1a43332..1c275d37ce18 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(Firebird.5.LinqService).sql @@ -1,229 +1,13 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" > 3 +RETURNING + NEW."Value" diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(Firebird.5.LinqService).sql index 3b67f1a43332..9faddaf128b5 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(Firebird.5.LinqService).sql @@ -1,229 +1,19 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Id" = "s"."Id", + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" > 3 +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(Firebird.5.LinqService).sql index 3b67f1a43332..4fc3675da2b3 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(Firebird.5.LinqService).sql @@ -1,229 +1,15 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Id" = "s"."Id", + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" > 3 +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(Firebird.5.LinqService).sql b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(Firebird.5.LinqService).sql index 3b67f1a43332..7325f7a7054b 100644 --- a/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(Firebird.5.LinqService).sql +++ b/Firebird.5.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(Firebird.5.LinqService).sql @@ -1,229 +1,14 @@ BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.5 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.5 Firebird4 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Id" = "s"."Id", + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" > 3 +RETURNING + NEW."Value" diff --git a/Firebird.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.5).sql b/Firebird.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.5).sql new file mode 100644 index 000000000000..0dd75d60e03c --- /dev/null +++ b/Firebird.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.5).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.5).sql b/Firebird.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.5).sql new file mode 100644 index 000000000000..89f7b2bcb1e0 --- /dev/null +++ b/Firebird.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.5).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.5).sql b/Firebird.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.5).sql new file mode 100644 index 000000000000..89f7b2bcb1e0 --- /dev/null +++ b/Firebird.5/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.5).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.5 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + From 74901da80e1bd2148f8947b4cd0292b6cf13eb62 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:38:42 +0000 Subject: [PATCH 10/40] [Linux / Informix 14.10] baselines --- ...ts.All4Async(Informix.DB2.LinqService).sql | 14 ++ ...roupBy2Async(Informix.DB2.LinqService).sql | 30 +++ ...merable1Test(Informix.DB2.LinqService).sql | 9 + ...merable2Test(Informix.DB2.LinqService).sql | 11 + ...bleCast1Test(Informix.DB2.LinqService).sql | 9 + ...bleCast2Test(Informix.DB2.LinqService).sql | 11 + ...insAsyncTest(Informix.DB2.LinqService).sql | 14 ++ ...rstAsyncTest(Informix.DB2.LinqService).sql | 14 ++ ...TakeSkipTest(Informix.DB2.LinqService).sql | 15 ++ ...rstOrDefault(Informix.DB2.LinqService).sql | 19 ++ ...kupAsyncTest(Informix.DB2.LinqService).sql | 21 ++ ...entAsyncTest(Informix.DB2.LinqService).sql | 21 ++ ...AnyTestAsync(Informix.DB2.LinqService).sql | 28 +++ ...nyTestAsync2(Informix.DB2.LinqService).sql | 28 +++ ...hoAsyncdTest(Informix.DB2.LinqService).sql | 15 ++ ...edTest3Async(Informix.DB2.LinqService).sql | 26 +++ ...insTestAsync(Informix.DB2.LinqService).sql | 28 +++ ...untTestAsync(Informix.DB2.LinqService).sql | 24 ++ ...ntTestAsync2(Informix.DB2.LinqService).sql | 24 ++ ...ntTestAsync1(Informix.DB2.LinqService).sql | 26 +++ ...ntTestAsync2(Informix.DB2.LinqService).sql | 26 +++ ...MaxTestAsync(Informix.DB2.LinqService).sql | 24 ++ ...axTestAsync2(Informix.DB2.LinqService).sql | 24 ++ ...edicateAsync(Informix.DB2.LinqService).sql | 170 +------------- ...edicateAsync(Informix.DB2.LinqService).sql | 168 +------------- ...edicateAsync(Informix.DB2.LinqService).sql | 167 +------------- ...edicateAsync(Informix.DB2.LinqService).sql | 167 +------------- ...edicateAsync(Informix.DB2.LinqService).sql | 168 +------------- ...electorAsync(Informix.DB2.LinqService).sql | 168 +------------- ...electorAsync(Informix.DB2.LinqService).sql | 168 +------------- ...edicateAsync(Informix.DB2.LinqService).sql | 167 +------------- ...edicateAsync(Informix.DB2.LinqService).sql | 167 +------------- ...Concat1Async(Informix.DB2.LinqService).sql | 19 ++ ...crementAsync(Informix.DB2.LinqService).sql | 97 ++++++++ ...ilteredAsync(Informix.DB2.LinqService).sql | 82 +++++++ ....Count1Async(Informix.DB2.LinqService).sql | 8 + ....Count2Async(Informix.DB2.LinqService).sql | 10 + ...eryMax1Async(Informix.DB2.LinqService).sql | 16 ++ ...ts.Issue4602(Informix.DB2.LinqService).sql | 48 +--- ...ue4057_Async(Informix.DB2.LinqService).sql | 29 +++ ...tTransaction(Informix.DB2.LinqService).sql | 29 +++ ...ressionAsync(Informix.DB2.LinqService).sql | 25 ++ ...s.Cast1Async(Informix.DB2.LinqService).sql | 11 + ....Test18Async(Informix.DB2.LinqService).sql | 13 ++ ...ameter1Async(Informix.DB2.LinqService).sql | 7 + ...ssue3132Test(Informix.DB2.LinqService).sql | 213 ++++++++++++++++++ ...2Async(Informix.DB2.LinqService,False).sql | 15 ++ ...t2Async(Informix.DB2.LinqService,True).sql | 15 ++ ...3Async(Informix.DB2.LinqService,False).sql | 15 ++ ...t3Async(Informix.DB2.LinqService,True).sql | 15 ++ ...leSkip1Async(Informix.DB2.LinqService).sql | 82 +------ ...1Async(Informix.DB2.LinqService,False).sql | 18 ++ ...e1Async(Informix.DB2.LinqService,True).sql | 22 ++ ...2Async(Informix.DB2.LinqService,False).sql | 11 + ...e2Async(Informix.DB2.LinqService,True).sql | 11 + ...3Async(Informix.DB2.LinqService,False).sql | 11 + ...e3Async(Informix.DB2.LinqService,True).sql | 13 ++ ...4Async(Informix.DB2.LinqService,False).sql | 11 + ...e4Async(Informix.DB2.LinqService,True).sql | 13 ++ ...5Async(Informix.DB2.LinqService,False).sql | 9 + ...e5Async(Informix.DB2.LinqService,True).sql | 11 + ...mix.DB2.LinqService,False,False,False).sql | 16 ++ ...rmix.DB2.LinqService,False,False,True).sql | 16 ++ ...rmix.DB2.LinqService,False,True,False).sql | 16 ++ ...ormix.DB2.LinqService,False,True,True).sql | 16 ++ ...rmix.DB2.LinqService,True,False,False).sql | 5 + ...ormix.DB2.LinqService,True,False,True).sql | 5 + ...ormix.DB2.LinqService,True,True,False).sql | 16 ++ ...formix.DB2.LinqService,True,True,True).sql | 16 ++ ...eTable1Async(Informix.DB2.LinqService).sql | 34 +++ ...teTableAsync(Informix.DB2.LinqService).sql | 30 +++ ...bleNameAsync(Informix.DB2.LinqService).sql | 88 ++++++++ ...Insert2Async(Informix.DB2.LinqService).sql | 44 ++++ ...Insert3Async(Informix.DB2.LinqService).sql | 46 ++++ ...Insert4Async(Informix.DB2.LinqService).sql | 46 ++++ ...bleNameAsync(Informix.DB2.LinqService).sql | 69 ++++++ ...eplace1Async(Informix.DB2.LinqService).sql | 73 ++++++ ...bleNameAsync(Informix.DB2.LinqService).sql | 129 +++++++++++ ...Update3Async(Informix.DB2.LinqService).sql | 71 ++++++ ...pdate3xAsync(Informix.DB2.LinqService).sql | 71 ++++++ ...entity1Async(Informix.DB2.LinqService).sql | 14 ++ ...entity2Async(Informix.DB2.LinqService).sql | 14 ++ ...entity4Async(Informix.DB2.LinqService).sql | 32 +++ ...romQueryAsyn(Informix.DB2.LinqService).sql | 39 ++++ ...romTableAsyn(Informix.DB2.LinqService).sql | 37 +++ ...Update1Async(Informix.DB2.LinqService).sql | 54 +++++ ...Update2Async(Informix.DB2.LinqService).sql | 54 +++++ ...bleNameAsync(Informix.DB2.LinqService).sql | 105 +++++++++ ...omplex1Async(Informix.DB2.LinqService).sql | 55 +++++ ...sts.Linq.AsyncTests.Test(Informix.DB2).sql | 18 ++ ...ts.Linq.AsyncTests.Test1(Informix.DB2).sql | 9 + ...q.AsyncTests.TestForEach(Informix.DB2).sql | 9 + 92 files changed, 2564 insertions(+), 1533 deletions(-) create mode 100644 Informix.DB2.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Informix.DB2.LinqService,False).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Informix.DB2.LinqService,True).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Informix.DB2.LinqService,False).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Informix.DB2.LinqService,True).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Informix.DB2.LinqService,False).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Informix.DB2.LinqService,True).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Informix.DB2.LinqService,False).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Informix.DB2.LinqService,True).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Informix.DB2.LinqService,False).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Informix.DB2.LinqService,True).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Informix.DB2.LinqService,False).sql create mode 100644 Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Informix.DB2.LinqService,True).sql create mode 100644 Informix.DB2.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Informix.DB2.LinqService).sql create mode 100644 Informix.DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Informix.DB2).sql create mode 100644 Informix.DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Informix.DB2).sql create mode 100644 Informix.DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Informix.DB2).sql diff --git a/Informix.DB2.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..863a05320a9b --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Informix.DB2.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID <= 3 + ) +FROM table(set{1}) + diff --git a/Informix.DB2.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..af8b04e02698 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Informix.DB2.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + m_1.ParentID, + d.ParentID, + d.ChildID +FROM + ( + SELECT DISTINCT + a_Parent1.ParentID + FROM + Child t1 + INNER JOIN Parent a_Parent1 ON t1.ParentID = a_Parent1.ParentID + ) m_1 + INNER JOIN Child d + INNER JOIN Parent a_Parent1_1 ON d.ParentID = a_Parent1_1.ParentID + ON m_1.ParentID = a_Parent1_1.ParentID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + a_Parent1.ParentID +FROM + Child t1 + INNER JOIN Parent a_Parent1 ON t1.ParentID = a_Parent1.ParentID +GROUP BY + a_Parent1.ParentID + diff --git a/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..1b62ecdc02f2 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Informix.DB2.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..6210b451d35e --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Informix.DB2.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID > 1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..1b62ecdc02f2 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Informix.DB2.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..6210b451d35e --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Informix.DB2.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID > 1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..33b8b0a723d9 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Informix.DB2.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Person t1 + WHERE + 1 = t1.PersonID + ) +FROM table(set{1}) + diff --git a/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..56c5ad1e56d9 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Informix.DB2.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 1 + p.FirstName, + p.PersonID, + p.LastName, + p.MiddleName, + p.Gender +FROM + Person p +WHERE + p.PersonID = 1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Informix.DB2.LinqService).sql index 8b62115cdce5..1fc0843c6816 100644 --- a/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Informix.DB2.LinqService).sql @@ -13,3 +13,18 @@ FROM ORDER BY t1.ParentID +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @skip Integer(4) -- Int32 +SET @skip = 1 +DECLARE @take Integer(4) -- Int32 +SET @take = 2 + +SELECT SKIP @skip FIRST @take + t1.ParentID, + t1.Value1 +FROM + Parent t1 +ORDER BY + t1.ParentID + diff --git a/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..76260574bb89 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Informix.DB2.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 +DECLARE @p_1 Integer(4) -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer(4) -- Int32 +SET @p_2 = 3 +DECLARE @param Integer(4) -- Int32 +SET @param = 4 + +SELECT FIRST 1 + o.ParentID, + o.Value1 +FROM + Parent o +WHERE + o.ParentID IN (@p, @p_1, @p_2) OR o.ParentID = @param + diff --git a/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..7d1f38f7f447 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Informix.DB2.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +ORDER BY + t1.ParentID, + t1.ChildID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..7d1f38f7f447 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Informix.DB2.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +ORDER BY + t1.ParentID, + t1.ChildID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..c8e00ed1b95d --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Informix.DB2.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = 1 + ) +FROM table(set{1}) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = -1 + ) +FROM table(set{1}) + diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..c8e00ed1b95d --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Informix.DB2.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = 1 + ) +FROM table(set{1}) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = -1 + ) +FROM table(set{1}) + diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..3bb66bf3b2a4 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Informix.DB2.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT FIRST 1 + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID = @p +ORDER BY + x.ParentID DESC + diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..76b9a1a2c72b --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Informix.DB2.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT FIRST @p + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = @p + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT FIRST @p + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = @p + diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..9147f2cd6193 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Informix.DB2.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + 1 = c_1.ParentID + ) +FROM table(set{1}) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + -1 = c_1.ParentID + ) +FROM table(set{1}) + diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..d1508bddada6 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Informix.DB2.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = @p + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = @p + diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..d1508bddada6 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Informix.DB2.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = @p + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = @p + diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..51d38e0266bd --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Informix.DB2.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT FIRST 1 + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = @p + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT FIRST 1 + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = @p + diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..51d38e0266bd --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Informix.DB2.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT FIRST 1 + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = @p + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT FIRST 1 + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = @p + diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..de9c20546ece --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Informix.DB2.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + MAX(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = @p + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = -1 + +SELECT + MAX(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = @p + diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..de9c20546ece --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Informix.DB2.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + MAX(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = @p + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = -1 + +SELECT + MAX(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = @p + diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Informix.DB2.LinqService).sql index 2a497e46626f..2dd7dd48b119 100644 --- a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Informix.DB2.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- Informix.DB2 Informix - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int NOT NULL, - - PRIMARY KEY (Id) -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable +-- Informix.DB2 Informix (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + AsyncDataTable c_1 + WHERE + c_1.Id = 2 + ) +FROM table(set{1}) diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Informix.DB2.LinqService).sql index 2a497e46626f..1572eb4932f7 100644 --- a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Informix.DB2.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- Informix.DB2 Informix - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int NOT NULL, - - PRIMARY KEY (Id) -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = @p diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Informix.DB2.LinqService).sql index 2a497e46626f..13854a4dee62 100644 --- a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Informix.DB2.LinqService).sql @@ -1,160 +1,11 @@ BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- Informix.DB2 Informix - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int NOT NULL, - - PRIMARY KEY (Id) -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 1 + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Informix.DB2.LinqService).sql index 2a497e46626f..13854a4dee62 100644 --- a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Informix.DB2.LinqService).sql @@ -1,160 +1,11 @@ BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- Informix.DB2 Informix - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int NOT NULL, - - PRIMARY KEY (Id) -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 1 + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Informix.DB2.LinqService).sql index 2a497e46626f..1572eb4932f7 100644 --- a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Informix.DB2.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- Informix.DB2 Informix - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int NOT NULL, - - PRIMARY KEY (Id) -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = @p diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Informix.DB2.LinqService).sql index 2a497e46626f..ce474a5ee93c 100644 --- a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Informix.DB2.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- Informix.DB2 Informix - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int NOT NULL, - - PRIMARY KEY (Id) -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + MAX(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > @p diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Informix.DB2.LinqService).sql index 2a497e46626f..a95981ffde13 100644 --- a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Informix.DB2.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- Informix.DB2 Informix - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int NOT NULL, - - PRIMARY KEY (Id) -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + MIN(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > @p diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Informix.DB2.LinqService).sql index 2a497e46626f..6715ccf31727 100644 --- a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Informix.DB2.LinqService).sql @@ -1,160 +1,11 @@ BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- Informix.DB2 Informix - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int NOT NULL, - - PRIMARY KEY (Id) -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 2 + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Informix.DB2.LinqService).sql index 2a497e46626f..6715ccf31727 100644 --- a/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Informix.DB2.LinqService).sql @@ -1,160 +1,11 @@ BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- Informix.DB2 Informix - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int NOT NULL, - - PRIMARY KEY (Id) -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - @Id -) - -BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS AsyncDataTable +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 2 + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/Informix.DB2.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..163a55f16c63 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Informix.DB2.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID = 1 +UNION ALL +SELECT + p_1.ParentID, + p_1.Value1 +FROM + Parent p_1 +WHERE + p_1.ParentID = 2 + diff --git a/Informix.DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Informix.DB2.LinqService).sql index 7b99bc64e57e..f17926540a18 100644 --- a/Informix.DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Informix.DB2.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO ConcurrencyAutoIncrement +( + Id, + Stamp, + "Value" +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Informix.DB2 Informix SELECT @@ -8,6 +30,23 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -10 + +UPDATE + ConcurrencyAutoIncrement obj +SET + Stamp = obj.Stamp + 1, + "Value" = @Value +WHERE + obj.Id = @Id AND obj.Stamp = @Stamp + BeforeExecute -- Informix.DB2 Informix @@ -18,6 +57,23 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -9 + +UPDATE + ConcurrencyAutoIncrement obj +SET + Stamp = obj.Stamp + 1, + "Value" = @Value +WHERE + obj.Id = @Id AND obj.Stamp = @Stamp + BeforeExecute -- Informix.DB2 Informix @@ -28,6 +84,23 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -9 + +UPDATE + ConcurrencyAutoIncrement obj +SET + Stamp = obj.Stamp + 1, + "Value" = @Value +WHERE + obj.Id = @Id AND obj.Stamp = @Stamp + BeforeExecute -- Informix.DB2 Informix @@ -38,6 +111,18 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -9 + +DELETE FROM + ConcurrencyAutoIncrement +WHERE + ConcurrencyAutoIncrement.Id = @Id AND ConcurrencyAutoIncrement.Stamp = @Stamp + BeforeExecute -- Informix.DB2 Informix @@ -48,6 +133,18 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -8 + +DELETE FROM + ConcurrencyAutoIncrement +WHERE + ConcurrencyAutoIncrement.Id = @Id AND ConcurrencyAutoIncrement.Stamp = @Stamp + BeforeExecute -- Informix.DB2 Informix diff --git a/Informix.DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Informix.DB2.LinqService).sql index fc0fb0954ca3..40393e39774d 100644 --- a/Informix.DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Informix.DB2.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO ConcurrencyFiltered +( + Id, + Stamp, + "Value" +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Informix.DB2 Informix SELECT @@ -8,6 +30,23 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -10 + +UPDATE + ConcurrencyFiltered r +SET + Stamp = r.Stamp + 1, + "Value" = @Value +WHERE + r.Id = 2 AND r.Id = @Id AND r.Stamp = @Stamp + BeforeExecute -- Informix.DB2 Informix @@ -18,6 +57,23 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -10 + +UPDATE + ConcurrencyFiltered r +SET + Stamp = r.Stamp + 1, + "Value" = @Value +WHERE + r.Id = 1 AND r.Id = @Id AND r.Stamp = @Stamp + BeforeExecute -- Informix.DB2 Informix @@ -28,6 +84,19 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -9 + +DELETE FROM + ConcurrencyFiltered +WHERE + ConcurrencyFiltered.Id = 2 AND ConcurrencyFiltered.Id = @Id AND + ConcurrencyFiltered.Stamp = @Stamp + BeforeExecute -- Informix.DB2 Informix @@ -38,6 +107,19 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -9 + +DELETE FROM + ConcurrencyFiltered +WHERE + ConcurrencyFiltered.Id = 1 AND ConcurrencyFiltered.Id = @Id AND + ConcurrencyFiltered.Stamp = @Stamp + BeforeExecute -- Informix.DB2 Informix diff --git a/Informix.DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..fd33059d82f6 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Informix.DB2.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + COUNT(*) +FROM + Parent t1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..8da62cce59f3 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Informix.DB2.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID > 2 + diff --git a/Informix.DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..999ee6743350 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Informix.DB2.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + Child c_1 + LEFT JOIN Parent a_Parent ON c_1.ParentID = a_Parent.ParentID + WHERE + a_Parent.ParentID = t1.ParentID + )) +FROM + Parent t1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Informix.DB2.LinqService).sql index f76fe60b8f10..a4f9d91799e3 100644 --- a/Informix.DB2.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Informix.DB2.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS DynamicParent - -BeforeExecute --- Informix.DB2 Informix - -CREATE TABLE IF NOT EXISTS DynamicParent -( - ID SERIAL NOT NULL, - - PRIMARY KEY (ID) -) - -BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS DynamicChild - -BeforeExecute --- Informix.DB2 Informix - -CREATE TABLE IF NOT EXISTS DynamicChild -( - ID SERIAL NOT NULL, - ParentID Int NOT NULL, - - PRIMARY KEY (ID) -) - -BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS DynamicChild - -BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS DynamicParent +-- Informix.DB2 Informix (asynchronously) + +SELECT + it.ID +FROM + DynamicParent it + LEFT JOIN DynamicChild a_Child ON it.ID = a_Child.ParentID +WHERE + a_Child.ID = 123 diff --git a/Informix.DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Informix.DB2.LinqService).sql index a3f147d01e98..10e51ca7b1b9 100644 --- a/Informix.DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Informix.DB2.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + m_1.ParentID, + d.ParentID, + d.ChildID +FROM + ( + SELECT FIRST 1 + x.ParentID + FROM + Parent x + WHERE + x.ParentID = 3 + ) m_1 + INNER JOIN Child d ON m_1.ParentID = d.ParentID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 1 + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- Informix.DB2 Informix (asynchronously) diff --git a/Informix.DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Informix.DB2.LinqService).sql index 6b907c95c7d6..c5648e290af8 100644 --- a/Informix.DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Informix.DB2.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + m_1.ParentID, + d.ParentID, + d.ChildID +FROM + ( + SELECT FIRST 1 + x.ParentID + FROM + Parent x + WHERE + x.ParentID = 3 + ) m_1 + INNER JOIN Child d ON m_1.ParentID = d.ParentID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 1 + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID = 3 + +BeforeExecute BeginTransaction BeforeExecute -- Informix.DB2 Informix (asynchronously) diff --git a/Informix.DB2.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..8bf776d42a79 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Informix.DB2.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + Child a_Children + INNER JOIN GrandChild a_GrandChildren ON a_Children.ParentID = a_GrandChildren.ParentID AND a_Children.ChildID = a_GrandChildren.ChildID + WHERE + p.ParentID = a_Children.ParentID + ) +FROM + Parent p + diff --git a/Informix.DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..fa60d5c21cb5 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Informix.DB2.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 +WHERE + t1.Value1 = 1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..5b87b35a7bd2 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Informix.DB2.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT DISTINCT + p1.PersonID, + p1.Gender, + p1.FirstName, + p1.LastName +FROM + Person p1 +WHERE + p1.PersonID IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND p1.Gender = 'F' + diff --git a/Informix.DB2.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..59d0fbe9d4b0 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Informix.DB2.LinqService).sql @@ -0,0 +1,7 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + 1 +FROM table(set{1}) + diff --git a/Informix.DB2.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..86d86ff6ae94 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Informix.DB2.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + x.MiddleName, + COUNT(*) +FROM + Person x +WHERE + x.MiddleName IS NOT NULL +GROUP BY + x.MiddleName +UNION ALL +SELECT + x_1.MiddleName, + COUNT(*) +FROM + Person x_1 +WHERE + x_1.MiddleName IS NOT NULL +GROUP BY + x_1.MiddleName +UNION ALL +SELECT + x_2.MiddleName, + COUNT(*) +FROM + Person x_2 +WHERE + x_2.MiddleName IS NOT NULL +GROUP BY + x_2.MiddleName +UNION ALL +SELECT + x_3.MiddleName, + COUNT(*) +FROM + Person x_3 +WHERE + x_3.MiddleName IS NOT NULL +GROUP BY + x_3.MiddleName +UNION ALL +SELECT + x_4.MiddleName, + COUNT(*) +FROM + Person x_4 +WHERE + x_4.MiddleName IS NOT NULL +GROUP BY + x_4.MiddleName +UNION ALL +SELECT + x_5.MiddleName, + COUNT(*) +FROM + Person x_5 +WHERE + x_5.MiddleName IS NOT NULL +GROUP BY + x_5.MiddleName +UNION ALL +SELECT + x_6.MiddleName, + COUNT(*) +FROM + Person x_6 +WHERE + x_6.MiddleName IS NOT NULL +GROUP BY + x_6.MiddleName +UNION ALL +SELECT + x_7.MiddleName, + COUNT(*) +FROM + Person x_7 +WHERE + x_7.MiddleName IS NOT NULL +GROUP BY + x_7.MiddleName +UNION ALL +SELECT + x_8.MiddleName, + COUNT(*) +FROM + Person x_8 +WHERE + x_8.MiddleName IS NOT NULL +GROUP BY + x_8.MiddleName +UNION ALL +SELECT + x_9.MiddleName, + COUNT(*) +FROM + Person x_9 +WHERE + x_9.MiddleName IS NOT NULL +GROUP BY + x_9.MiddleName +UNION ALL +SELECT + x_10.MiddleName, + COUNT(*) +FROM + Person x_10 +WHERE + x_10.MiddleName IS NOT NULL +GROUP BY + x_10.MiddleName +UNION ALL +SELECT + x_11.MiddleName, + COUNT(*) +FROM + Person x_11 +WHERE + x_11.MiddleName IS NOT NULL +GROUP BY + x_11.MiddleName +UNION ALL +SELECT + x_12.MiddleName, + COUNT(*) +FROM + Person x_12 +WHERE + x_12.MiddleName IS NOT NULL +GROUP BY + x_12.MiddleName +UNION ALL +SELECT + x_13.MiddleName, + COUNT(*) +FROM + Person x_13 +WHERE + x_13.MiddleName IS NOT NULL +GROUP BY + x_13.MiddleName +UNION ALL +SELECT + x_14.MiddleName, + COUNT(*) +FROM + Person x_14 +WHERE + x_14.MiddleName IS NOT NULL +GROUP BY + x_14.MiddleName +UNION ALL +SELECT + x_15.MiddleName, + COUNT(*) +FROM + Person x_15 +WHERE + x_15.MiddleName IS NOT NULL +GROUP BY + x_15.MiddleName +UNION ALL +SELECT + x_16.MiddleName, + COUNT(*) +FROM + Person x_16 +WHERE + x_16.MiddleName IS NOT NULL +GROUP BY + x_16.MiddleName +UNION ALL +SELECT + x_17.MiddleName, + COUNT(*) +FROM + Person x_17 +WHERE + x_17.MiddleName IS NOT NULL +GROUP BY + x_17.MiddleName +UNION ALL +SELECT + x_18.MiddleName, + COUNT(*) +FROM + Person x_18 +WHERE + x_18.MiddleName IS NOT NULL +GROUP BY + x_18.MiddleName +UNION ALL +SELECT + x_19.MiddleName, + COUNT(*) +FROM + Person x_19 +WHERE + x_19.MiddleName IS NOT NULL +GROUP BY + x_19.MiddleName +UNION ALL +SELECT + x_20.MiddleName, + COUNT(*) +FROM + Person x_20 +WHERE + x_20.MiddleName IS NOT NULL +GROUP BY + x_20.MiddleName + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Informix.DB2.LinqService,False).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Informix.DB2.LinqService,False).sql new file mode 100644 index 000000000000..9637cb8974ed --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Informix.DB2.LinqService,False).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @n Integer(4) -- Int32 +SET @n = 3 + +SELECT SKIP @n FIRST 1 + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Informix.DB2.LinqService,True).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Informix.DB2.LinqService,True).sql new file mode 100644 index 000000000000..9637cb8974ed --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Informix.DB2.LinqService,True).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @n Integer(4) -- Int32 +SET @n = 3 + +SELECT SKIP @n FIRST 1 + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Informix.DB2.LinqService,False).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Informix.DB2.LinqService,False).sql new file mode 100644 index 000000000000..9637cb8974ed --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Informix.DB2.LinqService,False).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @n Integer(4) -- Int32 +SET @n = 3 + +SELECT SKIP @n FIRST 1 + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Informix.DB2.LinqService,True).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Informix.DB2.LinqService,True).sql new file mode 100644 index 000000000000..9637cb8974ed --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Informix.DB2.LinqService,True).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @n Integer(4) -- Int32 +SET @n = 3 + +SELECT SKIP @n FIRST 1 + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Informix.DB2.LinqService).sql index e31323cd37ea..ddcd89d9e288 100644 --- a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Informix.DB2.LinqService).sql @@ -1,74 +1,12 @@ BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS TakeSkipClass - -BeforeExecute --- Informix.DB2 Informix - -CREATE TABLE IF NOT EXISTS TakeSkipClass -( - "Value" VarChar(10) NULL -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Value VarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO TakeSkipClass -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Value VarChar(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO TakeSkipClass -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Value VarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO TakeSkipClass -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Informix.DB2 Informix -DECLARE @Value VarChar(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO TakeSkipClass -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Informix.DB2 Informix - -DROP TABLE IF EXISTS TakeSkipClass +-- Informix.DB2 Informix (asynchronously) +DECLARE @skip Integer(4) -- Int32 +SET @skip = 3 + +SELECT SKIP @skip + t1."Value" +FROM + TakeSkipClass t1 +ORDER BY + t1."Value" diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Informix.DB2.LinqService,False).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Informix.DB2.LinqService,False).sql index 9789d9cd965e..89d74ac95fe7 100644 --- a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Informix.DB2.LinqService,False).sql +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Informix.DB2.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT FIRST 3 FROM Child ch +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 2 + ch.ParentID, + ch.ChildID +FROM + Child ch + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 3 + ch.ParentID, + ch.ChildID +FROM + Child ch + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Informix.DB2.LinqService,True).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Informix.DB2.LinqService,True).sql index 40b7a53759a9..87f70e460649 100644 --- a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Informix.DB2.LinqService,True).sql +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Informix.DB2.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT FIRST @take FROM Child ch +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @take Integer(4) -- Int32 +SET @take = 2 + +SELECT FIRST @take + ch.ParentID, + ch.ChildID +FROM + Child ch + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @take Integer(4) -- Int32 +SET @take = 3 + +SELECT FIRST @take + ch.ParentID, + ch.ChildID +FROM + Child ch + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Informix.DB2.LinqService,False).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Informix.DB2.LinqService,False).sql new file mode 100644 index 000000000000..3c0d37101e14 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Informix.DB2.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @n Integer(4) -- Int32 +SET @n = 1 + +SELECT FIRST @n + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Informix.DB2.LinqService,True).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Informix.DB2.LinqService,True).sql new file mode 100644 index 000000000000..3c0d37101e14 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Informix.DB2.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @n Integer(4) -- Int32 +SET @n = 1 + +SELECT FIRST @n + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Informix.DB2.LinqService,False).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Informix.DB2.LinqService,False).sql new file mode 100644 index 000000000000..4f56e7c63ff5 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Informix.DB2.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 3 + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID > 3 OR ch.ChildID < 4 + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Informix.DB2.LinqService,True).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Informix.DB2.LinqService,True).sql new file mode 100644 index 000000000000..463d6de3255d --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Informix.DB2.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @take Integer(4) -- Int32 +SET @take = 3 + +SELECT FIRST @take + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID > 3 OR ch.ChildID < 4 + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Informix.DB2.LinqService,False).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Informix.DB2.LinqService,False).sql new file mode 100644 index 000000000000..69a6b3a56862 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Informix.DB2.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 3 + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID >= 0 AND ch.ChildID <= 100 + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Informix.DB2.LinqService,True).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Informix.DB2.LinqService,True).sql new file mode 100644 index 000000000000..6678b37b62e8 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Informix.DB2.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @take Integer(4) -- Int32 +SET @take = 3 + +SELECT FIRST @take + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID >= 0 AND ch.ChildID <= 100 + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Informix.DB2.LinqService,False).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Informix.DB2.LinqService,False).sql new file mode 100644 index 000000000000..851388e7c811 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Informix.DB2.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 3 + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Informix.DB2.LinqService,True).sql b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Informix.DB2.LinqService,True).sql new file mode 100644 index 000000000000..dfbac15715de --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Informix.DB2.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @take Integer(4) -- Int32 +SET @take = 3 + +SELECT FIRST @take + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,False,False).sql b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,False,False).sql index 57ffb06decad..89a28d3942db 100644 --- a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,False,False).sql +++ b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +CREATE TABLE Issue681Table2 +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + PRIMARY KEY (ID) +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,False,True).sql b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,False,True).sql index 8b3061afe709..ad09f75dcd15 100644 --- a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,False,True).sql +++ b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,False,True).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +CREATE TABLE informix.Issue681Table2 +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + PRIMARY KEY (ID) +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,True,False).sql b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,True,False).sql index ccf65a86e6f7..9223d47f02de 100644 --- a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,True,False).sql +++ b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,True,False).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +CREATE TABLE testdb:Issue681Table2 +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + PRIMARY KEY (ID) +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,True,True).sql b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,True,True).sql index 5deecc9dc757..afdd47ffe6f3 100644 --- a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,True,True).sql +++ b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,False,True,True).sql @@ -19,3 +19,19 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +CREATE TABLE testdb:informix.Issue681Table2 +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + PRIMARY KEY (ID) +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,False,False).sql b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,False,False).sql index b686d023ffcb..d18784dcf196 100644 --- a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,False,False).sql +++ b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,False,False).sql @@ -10,3 +10,8 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,False,True).sql b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,False,True).sql index 1365af6a2bfb..a80f11883a4d 100644 --- a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,False,True).sql +++ b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,False,True).sql @@ -18,3 +18,8 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,True,False).sql b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,True,False).sql index ef0ad3de3b6b..27032b5f2284 100644 --- a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,True,False).sql +++ b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,True,False).sql @@ -18,3 +18,19 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +CREATE TABLE testdb@informix:Issue681Table2 +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + PRIMARY KEY (ID) +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,True,True).sql b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,True,True).sql index dcf1c2edb71e..8291ad5d9fff 100644 --- a/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,True,True).sql +++ b/Informix.DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Informix.DB2.LinqService,True,True,True).sql @@ -26,3 +26,19 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +CREATE TABLE testdb@informix:informix.Issue681Table2 +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + PRIMARY KEY (ID) +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..a438630d4274 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Informix.DB2.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS TestTable + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +CREATE TABLE TestTable +( + ID SERIAL NOT NULL, + Field1 NVarChar(50) NULL, + Field2 NVarChar(255) NULL, + CreatedOn datetime year to fraction NULL, + + PRIMARY KEY (ID) +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + t1.ID, + t1.Field1, + t1.Field2, + t1.CreatedOn +FROM + TestTable t1 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE TestTable + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Informix.DB2.LinqService).sql index c2460f0687ce..1a5c16df051b 100644 --- a/Informix.DB2.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Informix.DB2.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS TempTable + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +CREATE TABLE IF NOT EXISTS TempTable +( + ID Int NOT NULL +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +INSERT INTO TempTable +( + ID +) +SELECT + p.ParentID +FROM + Parent p + +BeforeExecute -- Informix.DB2 Informix SELECT @@ -7,3 +32,8 @@ FROM Parent p INNER JOIN TempTable t ON p.ParentID = t.ID +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS TempTable + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..61242d13beb4 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Informix.DB2.LinqService).sql @@ -0,0 +1,88 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS xxPerson + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +CREATE TABLE xxPerson +( + FirstName NVarChar(255) NOT NULL, + PersonID SERIAL NOT NULL, + LastName NVarChar(255) NOT NULL, + MiddleName NVarChar(255) NULL, + Gender Char(1) NOT NULL, + + PRIMARY KEY (PersonID) +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- StringFixedLength +SET @Gender = 'M' + +INSERT INTO xxPerson +( + FirstName, + LastName, + MiddleName, + Gender +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson t1 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 2 + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + xxPerson t1 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @ID Integer(4) -- Int32 +SET @ID = 1 + +DELETE FROM + xxPerson +WHERE + xxPerson.PersonID = @ID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson t1 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE xxPerson + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..98d25b095c19 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Informix.DB2.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DELETE FROM + Child +WHERE + Child.ChildID > 1000 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +INSERT INTO Child +( + ParentID, + ChildID +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ChildID = @id + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DELETE FROM + Child +WHERE + Child.ChildID > 1000 + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..0de2e7e792ab --- /dev/null +++ b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Informix.DB2.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DELETE FROM + Child +WHERE + Child.ChildID > 1000 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +INSERT INTO Child +( + ParentID, + ChildID +) +SELECT + c_1.ParentID, + @id::Int +FROM + Child c_1 +WHERE + c_1.ChildID = 11 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ChildID = @id + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DELETE FROM + Child +WHERE + Child.ChildID > 1000 + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..0de2e7e792ab --- /dev/null +++ b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Informix.DB2.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DELETE FROM + Child +WHERE + Child.ChildID > 1000 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +INSERT INTO Child +( + ParentID, + ChildID +) +SELECT + c_1.ParentID, + @id::Int +FROM + Child c_1 +WHERE + c_1.ChildID = 11 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ChildID = @id + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DELETE FROM + Child +WHERE + Child.ChildID > 1000 + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Informix.DB2.LinqService).sql index 4b5c282c1037..3669f8efba2c 100644 --- a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Informix.DB2.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- Informix.DB2 Informix (asynchronously) + +CREATE TABLE xxPerson +( + FirstName NVarChar(255) NOT NULL, + PersonID SERIAL NOT NULL, + LastName NVarChar(255) NOT NULL, + MiddleName NVarChar(255) NULL, + Gender Char(1) NOT NULL, + + PRIMARY KEY (PersonID) +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- StringFixedLength +SET @Gender = 'M' + +INSERT INTO xxPerson +( + FirstName, + LastName, + MiddleName, + Gender +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) DECLARE @FirstName VarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName VarChar(4) -- String @@ -60,3 +100,32 @@ BeforeExecute SELECT DBINFO('sqlca.sqlerrd1') FROM systables where tabid = 1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson t1 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson p +WHERE + p.FirstName = 'Steven' AND p.LastName = 'King' AND + p.Gender = 'M' + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE xxPerson + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS xxPerson + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Informix.DB2.LinqService).sql index e793111fdc80..f211719337c1 100644 --- a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Informix.DB2.LinqService).sql @@ -59,3 +59,76 @@ BeforeExecute SELECT DBINFO('sqlca.sqlerrd1') FROM systables where tabid = 1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc0' +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 5 + +UPDATE + Patient t1 +SET + Diagnosis = @Diagnosis +WHERE + t1.PersonID = @PersonID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO Patient +( + PersonID, + Diagnosis +) +VALUES +( + @PersonID, + @Diagnosis +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc1' +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 5 + +UPDATE + Patient t1 +SET + Diagnosis = @Diagnosis +WHERE + t1.PersonID = @PersonID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc2' +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 5 + +UPDATE + Patient t1 +SET + Diagnosis = @Diagnosis +WHERE + t1.PersonID = @PersonID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +SELECT FIRST 2 + p.PersonID, + p.Diagnosis +FROM + Patient p +WHERE + p.PersonID = @id + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..0ba1abd3bb67 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Informix.DB2.LinqService).sql @@ -0,0 +1,129 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS xxPatient + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +CREATE TABLE xxPatient +( + PersonID Int NOT NULL, + Diagnosis NVarChar(255) NULL, + + PRIMARY KEY (PersonID) +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 1 + +UPDATE + xxPatient t1 +SET + Diagnosis = @Diagnosis +WHERE + t1.PersonID = @PersonID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO xxPatient +( + PersonID, + Diagnosis +) +VALUES +( + @PersonID, + @Diagnosis +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 2 + +UPDATE + xxPatient t1 +SET + Diagnosis = @Diagnosis +WHERE + t1.PersonID = @PersonID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO xxPatient +( + PersonID, + Diagnosis +) +VALUES +( + @PersonID, + @Diagnosis +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + COUNT(*) +FROM + xxPatient t1 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 1 + +UPDATE + xxPatient t1 +SET + Diagnosis = @Diagnosis +WHERE + t1.PersonID = @PersonID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 2 + +UPDATE + xxPatient t1 +SET + Diagnosis = @Diagnosis +WHERE + t1.PersonID = @PersonID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + COUNT(*) +FROM + xxPatient t1 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS xxPatient + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Informix.DB2.LinqService).sql index e793111fdc80..6e13041c813e 100644 --- a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Informix.DB2.LinqService).sql @@ -59,3 +59,74 @@ BeforeExecute SELECT DBINFO('sqlca.sqlerrd1') FROM systables where tabid = 1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @i Integer(4) -- Int32 +SET @i = 0 +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +UPDATE + Patient t1 +SET + Diagnosis = To_Char(CHAR_LENGTH(t1.Diagnosis) + @i::Int) +WHERE + t1.PersonID = @id + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +INSERT INTO Patient +( + PersonID, + Diagnosis +) +VALUES +( + @id, + 'abc' +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @i Integer(4) -- Int32 +SET @i = 1 +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +UPDATE + Patient t1 +SET + Diagnosis = To_Char(CHAR_LENGTH(t1.Diagnosis) + @i::Int) +WHERE + t1.PersonID = @id + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @i Integer(4) -- Int32 +SET @i = 2 +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +UPDATE + Patient t1 +SET + Diagnosis = To_Char(CHAR_LENGTH(t1.Diagnosis) + @i::Int) +WHERE + t1.PersonID = @id + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +SELECT FIRST 2 + p.PersonID, + p.Diagnosis +FROM + Patient p +WHERE + p.PersonID = @id + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Informix.DB2.LinqService).sql index e793111fdc80..def75374973c 100644 --- a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Informix.DB2.LinqService).sql @@ -59,3 +59,74 @@ BeforeExecute SELECT DBINFO('sqlca.sqlerrd1') FROM systables where tabid = 1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @i Integer(4) -- Int32 +SET @i = 0 +DECLARE @id2 Integer(4) -- Int32 +SET @id2 = 5 + +UPDATE + Patient t1 +SET + Diagnosis = To_Char(CHAR_LENGTH(t1.Diagnosis) + @i::Int) +WHERE + t1.PersonID = @id2 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +INSERT INTO Patient +( + PersonID, + Diagnosis +) +VALUES +( + @id, + 'abc' +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @i Integer(4) -- Int32 +SET @i = 1 +DECLARE @id2 Integer(4) -- Int32 +SET @id2 = 5 + +UPDATE + Patient t1 +SET + Diagnosis = To_Char(CHAR_LENGTH(t1.Diagnosis) + @i::Int) +WHERE + t1.PersonID = @id2 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @i Integer(4) -- Int32 +SET @i = 2 +DECLARE @id2 Integer(4) -- Int32 +SET @id2 = 5 + +UPDATE + Patient t1 +SET + Diagnosis = To_Char(CHAR_LENGTH(t1.Diagnosis) + @i::Int) +WHERE + t1.PersonID = @id2 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +SELECT FIRST 2 + p.PersonID, + p.Diagnosis +FROM + Patient p +WHERE + p.PersonID = @id + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Informix.DB2.LinqService).sql index 8c274d464171..74f54365f393 100644 --- a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Informix.DB2.LinqService).sql @@ -27,6 +27,20 @@ BeforeExecute SELECT DBINFO('sqlca.sqlerrd1') FROM systables where tabid = 1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 2 + p.FirstName, + p.PersonID, + p.LastName, + p.MiddleName, + p.Gender +FROM + Person p +WHERE + p.FirstName = 'John' AND p.LastName = 'Shepard' + BeforeExecute -- Informix.DB2 Informix diff --git a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Informix.DB2.LinqService).sql index 8c274d464171..74f54365f393 100644 --- a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Informix.DB2.LinqService).sql @@ -27,6 +27,20 @@ BeforeExecute SELECT DBINFO('sqlca.sqlerrd1') FROM systables where tabid = 1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 2 + p.FirstName, + p.PersonID, + p.LastName, + p.MiddleName, + p.Gender +FROM + Person p +WHERE + p.FirstName = 'John' AND p.LastName = 'Shepard' + BeforeExecute -- Informix.DB2 Informix diff --git a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Informix.DB2.LinqService).sql index 76ccf8c2903d..7d6b963a706e 100644 --- a/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Informix.DB2.LinqService).sql @@ -37,6 +37,22 @@ BeforeExecute SELECT DBINFO('sqlca.sqlerrd1') FROM systables where tabid = 1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John0' + +SELECT FIRST 2 + p.FirstName, + p.PersonID, + p.LastName, + p.MiddleName, + p.Gender +FROM + Person p +WHERE + p.FirstName = @p AND p.LastName = 'Shepard' + BeforeExecute -- Informix.DB2 Informix (asynchronously) DECLARE @FirstName VarChar(5) -- String @@ -68,6 +84,22 @@ BeforeExecute SELECT DBINFO('sqlca.sqlerrd1') FROM systables where tabid = 1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John1' + +SELECT FIRST 2 + p.FirstName, + p.PersonID, + p.LastName, + p.MiddleName, + p.Gender +FROM + Person p +WHERE + p.FirstName = @p AND p.LastName = 'Shepard' + BeforeExecute -- Informix.DB2 Informix diff --git a/Informix.DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Informix.DB2.LinqService).sql index e7729779162e..7d065f148649 100644 --- a/Informix.DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Informix.DB2.LinqService).sql @@ -218,6 +218,45 @@ VALUES @Field4 ) +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +MERGE INTO TestMerge1 Target +USING ( + SELECT + t1.Id as source_Id, + t1.Field1 as source_Field1, + t1.Field2 as source_Field2, + t1.Field4 as source_Field4 + FROM + TestMerge2 t1 + WHERE + t1.Id = 5 +) Source +( + source_Id, + source_Field1, + source_Field2, + source_Field4 +) +ON (Target.Id = Source.source_Id) + +WHEN NOT MATCHED THEN +INSERT +( + Id, + Field1, + Field2, + Field4 +) +VALUES +( + Source.source_Id, + Source.source_Field1, + Source.source_Field2, + Source.source_Field4 +) + BeforeExecute -- Informix.DB2 Informix diff --git a/Informix.DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Informix.DB2.LinqService).sql index e7729779162e..38161a07e571 100644 --- a/Informix.DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Informix.DB2.LinqService).sql @@ -218,6 +218,43 @@ VALUES @Field4 ) +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +MERGE INTO TestMerge1 Target +USING ( + SELECT + t1.Id as source_Id, + t1.Field1 as source_Field1, + t1.Field2 as source_Field2, + t1.Field4 as source_Field4 + FROM + TestMerge2 t1 +) Source +( + source_Id, + source_Field1, + source_Field2, + source_Field4 +) +ON (Target.Id = Source.source_Id) + +WHEN NOT MATCHED THEN +INSERT +( + Id, + Field1, + Field2, + Field4 +) +VALUES +( + Source.source_Id, + Source.source_Field1, + Source.source_Field2, + Source.source_Field4 +) + BeforeExecute -- Informix.DB2 Informix diff --git a/Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..b39a02d742c9 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Informix.DB2.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @ParentID Integer(4) -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer(4) -- Int32 +SET @Value1 = 1001 + +INSERT INTO Parent +( + ParentID, + Value1 +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @ParentID Integer(4) -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = @ParentID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @ParentID Integer(4) -- Int32 +SET @ParentID = 1001 + +UPDATE + Parent p +SET + ParentID = p.ParentID + 1 +WHERE + p.ParentID = @ParentID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = @p + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..b39a02d742c9 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Informix.DB2.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @ParentID Integer(4) -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer(4) -- Int32 +SET @Value1 = 1001 + +INSERT INTO Parent +( + ParentID, + Value1 +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @ParentID Integer(4) -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = @ParentID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @ParentID Integer(4) -- Int32 +SET @ParentID = 1001 + +UPDATE + Parent p +SET + ParentID = p.ParentID + 1 +WHERE + p.ParentID = @ParentID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = @p + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Informix.DB2.LinqService).sql new file mode 100644 index 000000000000..83c4a12c4f77 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Informix.DB2.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE IF EXISTS xxPerson + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +CREATE TABLE xxPerson +( + FirstName NVarChar(255) NOT NULL, + PersonID SERIAL NOT NULL, + LastName NVarChar(255) NOT NULL, + MiddleName NVarChar(255) NULL, + Gender Char(1) NOT NULL, + + PRIMARY KEY (PersonID) +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- StringFixedLength +SET @Gender = 'M' + +INSERT INTO xxPerson +( + FirstName, + LastName, + MiddleName, + Gender +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson t1 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 2 + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + xxPerson t1 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @ID Integer(4) -- Int32 +SET @ID = 1 + +UPDATE + xxPerson t1 +SET + FirstName = @FirstName, + LastName = @LastName, + MiddleName = @MiddleName, + Gender = @Gender +WHERE + t1.PersonID = @ID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT FIRST 2 + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + xxPerson t1 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +DROP TABLE xxPerson + diff --git a/Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Informix.DB2.LinqService).sql index 5ff513f3604b..8290a3ee12c6 100644 --- a/Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Informix.DB2.LinqService).sql +++ b/Informix.DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Informix.DB2.LinqService).sql @@ -59,3 +59,58 @@ BeforeExecute SELECT DBINFO('sqlca.sqlerrd1') FROM systables where tabid = 1 +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +SELECT FIRST 1 + t1.PersonID, + t1.Gender, + t1.FirstName, + t1.MiddleName, + t1.LastName +FROM + Person t1 +WHERE + t1.PersonID = @id + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @Gender Char(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName VarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName VarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName VarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer(4) -- Int32 +SET @ID = 5 + +UPDATE + Person t1 +SET + Gender = @Gender, + FirstName = @Name_FirstName, + MiddleName = @Name_MiddleName, + LastName = @Name_LastName +WHERE + t1.PersonID = @ID + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +SELECT FIRST 1 + t1.PersonID, + t1.Gender, + t1.FirstName, + t1.MiddleName, + t1.LastName +FROM + Person t1 +WHERE + t1.PersonID = @id + diff --git a/Informix.DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Informix.DB2).sql b/Informix.DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Informix.DB2).sql new file mode 100644 index 000000000000..f8e35a87d1ef --- /dev/null +++ b/Informix.DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Informix.DB2).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/Informix.DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Informix.DB2).sql b/Informix.DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Informix.DB2).sql new file mode 100644 index 000000000000..1b62ecdc02f2 --- /dev/null +++ b/Informix.DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Informix.DB2).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/Informix.DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Informix.DB2).sql b/Informix.DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Informix.DB2).sql new file mode 100644 index 000000000000..1b62ecdc02f2 --- /dev/null +++ b/Informix.DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Informix.DB2).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Informix.DB2 Informix (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + From 3f6f4ebebb6a3df8757ee3ab5856ebb6d99ef135 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:39:21 +0000 Subject: [PATCH 11/40] [Windows / SQL Server 2019] baselines --- ....All4Async(SqlServer.2019.LinqService).sql | 13 + ...upBy2Async(SqlServer.2019.LinqService).sql | 30 ++ ...rable1Test(SqlServer.2019.LinqService).sql | 9 + ...rable2Test(SqlServer.2019.LinqService).sql | 11 + ...eCast1Test(SqlServer.2019.LinqService).sql | 9 + ...eCast2Test(SqlServer.2019.LinqService).sql | 11 + ...sAsyncTest(SqlServer.2019.LinqService).sql | 13 + ...tAsyncTest(SqlServer.2019.LinqService).sql | 14 + ...keSkipTest(SqlServer.2019.LinqService).sql | 16 + ...tOrDefault(SqlServer.2019.LinqService).sql | 19 + ...pAsyncTest(SqlServer.2019.LinqService).sql | 21 + ...tAsyncTest(SqlServer.2019.LinqService).sql | 21 + ...yTestAsync(SqlServer.2019.LinqService).sql | 30 ++ ...TestAsync2(SqlServer.2019.LinqService).sql | 30 ++ ...AsyncdTest(SqlServer.2019.LinqService).sql | 15 + ...Test3Async(SqlServer.2019.LinqService).sql | 26 + ...sTestAsync(SqlServer.2019.LinqService).sql | 26 + ...tTestAsync(SqlServer.2019.LinqService).sql | 24 + ...TestAsync2(SqlServer.2019.LinqService).sql | 24 + ...TestAsync1(SqlServer.2019.LinqService).sql | 26 + ...TestAsync2(SqlServer.2019.LinqService).sql | 26 + ...xTestAsync(SqlServer.2019.LinqService).sql | 24 + ...TestAsync2(SqlServer.2019.LinqService).sql | 24 + ...icateAsync(SqlServer.2019.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2019.LinqService).sql | 169 +------ ...icateAsync(SqlServer.2019.LinqService).sql | 170 +------ ...icateAsync(SqlServer.2019.LinqService).sql | 170 +------ ...icateAsync(SqlServer.2019.LinqService).sql | 169 +------ ...ectorAsync(SqlServer.2019.LinqService).sql | 169 +------ ...ectorAsync(SqlServer.2019.LinqService).sql | 169 +------ ...icateAsync(SqlServer.2019.LinqService).sql | 170 +------ ...icateAsync(SqlServer.2019.LinqService).sql | 170 +------ ...ncat1Async(SqlServer.2019.LinqService).sql | 19 + ...ementAsync(SqlServer.2019.LinqService).sql | 99 ++++ ...teredAsync(SqlServer.2019.LinqService).sql | 84 ++++ ...ount1Async(SqlServer.2019.LinqService).sql | 8 + ...ount2Async(SqlServer.2019.LinqService).sql | 10 + ...yMax1Async(SqlServer.2019.LinqService).sql | 17 + ....Issue4602(SqlServer.2019.LinqService).sql | 50 +- ...4057_Async(SqlServer.2019.LinqService).sql | 29 ++ ...ransaction(SqlServer.2019.LinqService).sql | 29 ++ ...ssionAsync(SqlServer.2019.LinqService).sql | 25 + ...Cast1Async(SqlServer.2019.LinqService).sql | 11 + ...est18Async(SqlServer.2019.LinqService).sql | 14 + ...eter1Async(SqlServer.2019.LinqService).sql | 6 + ...ue3132Test(SqlServer.2019.LinqService).sql | 213 ++++++++ ...sync(SqlServer.2019.LinqService,False).sql | 16 + ...Async(SqlServer.2019.LinqService,True).sql | 16 + ...sync(SqlServer.2019.LinqService,False).sql | 16 + ...Async(SqlServer.2019.LinqService,True).sql | 16 + ...Skip1Async(SqlServer.2019.LinqService).sql | 84 +--- ...sync(SqlServer.2019.LinqService,False).sql | 18 + ...Async(SqlServer.2019.LinqService,True).sql | 22 + ...sync(SqlServer.2019.LinqService,False).sql | 11 + ...Async(SqlServer.2019.LinqService,True).sql | 11 + ...sync(SqlServer.2019.LinqService,False).sql | 11 + ...Async(SqlServer.2019.LinqService,True).sql | 13 + ...sync(SqlServer.2019.LinqService,False).sql | 11 + ...Async(SqlServer.2019.LinqService,True).sql | 13 + ...sync(SqlServer.2019.LinqService,False).sql | 9 + ...Async(SqlServer.2019.LinqService,True).sql | 11 + ...er.2019.LinqService,False,False,False).sql | 16 + ...ver.2019.LinqService,False,False,True).sql | 16 + ...ver.2019.LinqService,False,True,False).sql | 16 + ...rver.2019.LinqService,False,True,True).sql | 16 + ...able1Async(SqlServer.2019.LinqService).sql | 34 ++ ...TableAsync(SqlServer.2019.LinqService).sql | 31 ++ ...eNameAsync(SqlServer.2019.LinqService).sql | 89 ++++ ...ncTest(SqlServer.2019.LinqService,100).sql | 18 + ...ncTest(SqlServer.2019.LinqService,200).sql | 18 + ...Record(SqlServer.2019.LinqService,100).sql | 13 + ...Record(SqlServer.2019.LinqService,200).sql | 13 + ...ncTest(SqlServer.2019.LinqService,100).sql | 15 + ...ncTest(SqlServer.2019.LinqService,200).sql | 15 + ...Record(SqlServer.2019.LinqService,100).sql | 15 + ...Record(SqlServer.2019.LinqService,200).sql | 15 + ...ncTest(SqlServer.2019.LinqService,100).sql | 21 + ...ncTest(SqlServer.2019.LinqService,200).sql | 21 + ...ncTest(SqlServer.2019.LinqService,100).sql | 12 + ...ncTest(SqlServer.2019.LinqService,200).sql | 12 + ...Record(SqlServer.2019.LinqService,100).sql | 12 + ...Record(SqlServer.2019.LinqService,200).sql | 12 + ...sert2Async(SqlServer.2019.LinqService).sql | 46 ++ ...sert3Async(SqlServer.2019.LinqService).sql | 48 ++ ...sert4Async(SqlServer.2019.LinqService).sql | 48 ++ ...eNameAsync(SqlServer.2019.LinqService).sql | 69 +++ ...lace1Async(SqlServer.2019.LinqService).sql | 97 ++++ ...eNameAsync(SqlServer.2019.LinqService).sql | 149 ++++++ ...date3Async(SqlServer.2019.LinqService).sql | 97 ++++ ...ate3xAsync(SqlServer.2019.LinqService).sql | 103 ++++ ...tity1Async(SqlServer.2019.LinqService).sql | 14 + ...tity2Async(SqlServer.2019.LinqService).sql | 14 + ...tity4Async(SqlServer.2019.LinqService).sql | 32 ++ ...syncTest(SqlServer.2019.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2019.LinqService,2).sql | 41 +- ...syncTest(SqlServer.2019.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2019.LinqService,2).sql | 41 +- ...tAsync(SqlServer.2019.LinqService,100).sql | 24 + ...tAsync(SqlServer.2019.LinqService,200).sql | 24 + ...Record(SqlServer.2019.LinqService,100).sql | 24 + ...Record(SqlServer.2019.LinqService,200).sql | 24 + ...syncTest(SqlServer.2019.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2019.LinqService,2).sql | 41 +- ...syncTest(SqlServer.2019.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2019.LinqService,2).sql | 41 +- ...tFullAsync(SqlServer.2019.LinqService).sql | 54 +++ ...ctionAsync(SqlServer.2019.LinqService).sql | 53 ++ ...mQueryAsyn(SqlServer.2019.LinqService).sql | 40 ++ ...mTableAsyn(SqlServer.2019.LinqService).sql | 38 ++ ...ate12Async(SqlServer.2019.LinqService).sql | 13 + ...date1Async(SqlServer.2019.LinqService).sql | 54 +++ ...date2Async(SqlServer.2019.LinqService).sql | 54 +++ ...date4Async(SqlServer.2019.LinqService).sql | 55 +++ ...tion1Async(SqlServer.2019.LinqService).sql | 41 ++ ...n1AsyncOld(SqlServer.2019.LinqService).sql | 41 ++ ...eNameAsync(SqlServer.2019.LinqService).sql | 105 ++++ ...plex1Async(SqlServer.2019.LinqService).sql | 55 +++ ...oTestAsync(SqlServer.2019.LinqService).sql | 23 + ...tTestAsync(SqlServer.2019.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2019.LinqService).sql | 456 +----------------- ...oTestAsync(SqlServer.2019.LinqService).sql | 23 + ...tTestAsync(SqlServer.2019.LinqService).sql | 451 +---------------- ...nateUpdate(SqlServer.2019.LinqService).sql | 450 +---------------- ...ngleRecord(SqlServer.2019.LinqService).sql | 452 +---------------- ...WithoutOld(SqlServer.2019.LinqService).sql | 450 +---------------- ...nateUpdate(SqlServer.2019.LinqService).sql | 449 +---------------- ...ngleRecord(SqlServer.2019.LinqService).sql | 451 +---------------- ...oTestAsync(SqlServer.2019.LinqService).sql | 23 + ...tTestAsync(SqlServer.2019.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2019.LinqService).sql | 456 +----------------- ...oTestAsync(SqlServer.2019.LinqService).sql | 23 + ...tTestAsync(SqlServer.2019.LinqService).sql | 451 +---------------- ...nateUpdate(SqlServer.2019.LinqService).sql | 450 +---------------- ...ngleRecord(SqlServer.2019.LinqService).sql | 452 +---------------- ...WithoutOld(SqlServer.2019.LinqService).sql | 450 +---------------- ...nateUpdate(SqlServer.2019.LinqService).sql | 449 +---------------- ...ngleRecord(SqlServer.2019.LinqService).sql | 451 +---------------- ...oTestAsync(SqlServer.2019.LinqService).sql | 21 + ...tTestAsync(SqlServer.2019.LinqService).sql | 233 +-------- ...ngleRecord(SqlServer.2019.LinqService).sql | 233 +-------- ...tTestAsync(SqlServer.2019.LinqService).sql | 229 +-------- ...ngleRecord(SqlServer.2019.LinqService).sql | 229 +-------- ...WithoutOld(SqlServer.2019.LinqService).sql | 228 +-------- ...ngleRecord(SqlServer.2019.LinqService).sql | 228 +-------- ...tIntoAsync(SqlServer.2019.LinqService).sql | 21 + ...oTestAsync(SqlServer.2019.LinqService).sql | 22 + ...tTestAsync(SqlServer.2019.LinqService).sql | 234 +-------- ...ngleRecord(SqlServer.2019.LinqService).sql | 234 +-------- ...tTestAsync(SqlServer.2019.LinqService).sql | 230 +-------- ...ngleRecord(SqlServer.2019.LinqService).sql | 230 +-------- ...WithoutOld(SqlServer.2019.LinqService).sql | 229 +-------- ...ngleRecord(SqlServer.2019.LinqService).sql | 229 +-------- ...tIntoAsync(SqlServer.2019.LinqService).sql | 22 + ...l4Async(SqlServer.2019.MS.LinqService).sql | 13 + ...y2Async(SqlServer.2019.MS.LinqService).sql | 30 ++ ...le1Test(SqlServer.2019.MS.LinqService).sql | 9 + ...le2Test(SqlServer.2019.MS.LinqService).sql | 11 + ...st1Test(SqlServer.2019.MS.LinqService).sql | 9 + ...st2Test(SqlServer.2019.MS.LinqService).sql | 11 + ...yncTest(SqlServer.2019.MS.LinqService).sql | 13 + ...yncTest(SqlServer.2019.MS.LinqService).sql | 14 + ...kipTest(SqlServer.2019.MS.LinqService).sql | 16 + ...Default(SqlServer.2019.MS.LinqService).sql | 19 + ...yncTest(SqlServer.2019.MS.LinqService).sql | 21 + ...yncTest(SqlServer.2019.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2019.MS.LinqService).sql | 30 ++ ...tAsync2(SqlServer.2019.MS.LinqService).sql | 30 ++ ...ncdTest(SqlServer.2019.MS.LinqService).sql | 15 + ...t3Async(SqlServer.2019.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2019.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2019.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2019.MS.LinqService).sql | 24 + ...tAsync1(SqlServer.2019.MS.LinqService).sql | 26 + ...tAsync2(SqlServer.2019.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2019.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2019.MS.LinqService).sql | 24 + ...teAsync(SqlServer.2019.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2019.MS.LinqService).sql | 169 +------ ...teAsync(SqlServer.2019.MS.LinqService).sql | 170 +------ ...teAsync(SqlServer.2019.MS.LinqService).sql | 170 +------ ...teAsync(SqlServer.2019.MS.LinqService).sql | 169 +------ ...orAsync(SqlServer.2019.MS.LinqService).sql | 169 +------ ...orAsync(SqlServer.2019.MS.LinqService).sql | 169 +------ ...teAsync(SqlServer.2019.MS.LinqService).sql | 170 +------ ...teAsync(SqlServer.2019.MS.LinqService).sql | 170 +------ ...t1Async(SqlServer.2019.MS.LinqService).sql | 19 + ...ntAsync(SqlServer.2019.MS.LinqService).sql | 99 ++++ ...edAsync(SqlServer.2019.MS.LinqService).sql | 84 ++++ ...t1Async(SqlServer.2019.MS.LinqService).sql | 8 + ...t2Async(SqlServer.2019.MS.LinqService).sql | 10 + ...x1Async(SqlServer.2019.MS.LinqService).sql | 17 + ...sue4602(SqlServer.2019.MS.LinqService).sql | 50 +- ...7_Async(SqlServer.2019.MS.LinqService).sql | 29 ++ ...saction(SqlServer.2019.MS.LinqService).sql | 29 ++ ...onAsync(SqlServer.2019.MS.LinqService).sql | 25 + ...t1Async(SqlServer.2019.MS.LinqService).sql | 11 + ...18Async(SqlServer.2019.MS.LinqService).sql | 14 + ...r1Async(SqlServer.2019.MS.LinqService).sql | 6 + ...132Test(SqlServer.2019.MS.LinqService).sql | 213 ++++++++ ...c(SqlServer.2019.MS.LinqService,False).sql | 16 + ...nc(SqlServer.2019.MS.LinqService,True).sql | 16 + ...c(SqlServer.2019.MS.LinqService,False).sql | 16 + ...nc(SqlServer.2019.MS.LinqService,True).sql | 16 + ...p1Async(SqlServer.2019.MS.LinqService).sql | 84 +--- ...c(SqlServer.2019.MS.LinqService,False).sql | 18 + ...nc(SqlServer.2019.MS.LinqService,True).sql | 22 + ...c(SqlServer.2019.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2019.MS.LinqService,True).sql | 11 + ...c(SqlServer.2019.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2019.MS.LinqService,True).sql | 13 + ...c(SqlServer.2019.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2019.MS.LinqService,True).sql | 13 + ...c(SqlServer.2019.MS.LinqService,False).sql | 9 + ...nc(SqlServer.2019.MS.LinqService,True).sql | 11 + ...2019.MS.LinqService,False,False,False).sql | 16 + ....2019.MS.LinqService,False,False,True).sql | 16 + ....2019.MS.LinqService,False,True,False).sql | 16 + ...r.2019.MS.LinqService,False,True,True).sql | 16 + ...e1Async(SqlServer.2019.MS.LinqService).sql | 34 ++ ...leAsync(SqlServer.2019.MS.LinqService).sql | 31 ++ ...meAsync(SqlServer.2019.MS.LinqService).sql | 89 ++++ ...est(SqlServer.2019.MS.LinqService,100).sql | 18 + ...est(SqlServer.2019.MS.LinqService,200).sql | 18 + ...ord(SqlServer.2019.MS.LinqService,100).sql | 13 + ...ord(SqlServer.2019.MS.LinqService,200).sql | 13 + ...est(SqlServer.2019.MS.LinqService,100).sql | 15 + ...est(SqlServer.2019.MS.LinqService,200).sql | 15 + ...ord(SqlServer.2019.MS.LinqService,100).sql | 15 + ...ord(SqlServer.2019.MS.LinqService,200).sql | 15 + ...est(SqlServer.2019.MS.LinqService,100).sql | 21 + ...est(SqlServer.2019.MS.LinqService,200).sql | 21 + ...est(SqlServer.2019.MS.LinqService,100).sql | 12 + ...est(SqlServer.2019.MS.LinqService,200).sql | 12 + ...ord(SqlServer.2019.MS.LinqService,100).sql | 12 + ...ord(SqlServer.2019.MS.LinqService,200).sql | 12 + ...t2Async(SqlServer.2019.MS.LinqService).sql | 46 ++ ...t3Async(SqlServer.2019.MS.LinqService).sql | 48 ++ ...t4Async(SqlServer.2019.MS.LinqService).sql | 48 ++ ...meAsync(SqlServer.2019.MS.LinqService).sql | 69 +++ ...e1Async(SqlServer.2019.MS.LinqService).sql | 97 ++++ ...meAsync(SqlServer.2019.MS.LinqService).sql | 149 ++++++ ...e3Async(SqlServer.2019.MS.LinqService).sql | 97 ++++ ...3xAsync(SqlServer.2019.MS.LinqService).sql | 103 ++++ ...y1Async(SqlServer.2019.MS.LinqService).sql | 14 + ...y2Async(SqlServer.2019.MS.LinqService).sql | 14 + ...y4Async(SqlServer.2019.MS.LinqService).sql | 32 ++ ...cTest(SqlServer.2019.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2019.MS.LinqService,2).sql | 41 +- ...cTest(SqlServer.2019.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2019.MS.LinqService,2).sql | 41 +- ...ync(SqlServer.2019.MS.LinqService,100).sql | 24 + ...ync(SqlServer.2019.MS.LinqService,200).sql | 24 + ...ord(SqlServer.2019.MS.LinqService,100).sql | 24 + ...ord(SqlServer.2019.MS.LinqService,200).sql | 24 + ...cTest(SqlServer.2019.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2019.MS.LinqService,2).sql | 41 +- ...cTest(SqlServer.2019.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2019.MS.LinqService,2).sql | 41 +- ...llAsync(SqlServer.2019.MS.LinqService).sql | 54 +++ ...onAsync(SqlServer.2019.MS.LinqService).sql | 53 ++ ...eryAsyn(SqlServer.2019.MS.LinqService).sql | 40 ++ ...bleAsyn(SqlServer.2019.MS.LinqService).sql | 38 ++ ...12Async(SqlServer.2019.MS.LinqService).sql | 13 + ...e1Async(SqlServer.2019.MS.LinqService).sql | 54 +++ ...e2Async(SqlServer.2019.MS.LinqService).sql | 54 +++ ...e4Async(SqlServer.2019.MS.LinqService).sql | 55 +++ ...n1Async(SqlServer.2019.MS.LinqService).sql | 41 ++ ...syncOld(SqlServer.2019.MS.LinqService).sql | 41 ++ ...meAsync(SqlServer.2019.MS.LinqService).sql | 105 ++++ ...x1Async(SqlServer.2019.MS.LinqService).sql | 55 +++ ...stAsync(SqlServer.2019.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2019.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2019.MS.LinqService).sql | 456 +----------------- ...stAsync(SqlServer.2019.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2019.MS.LinqService).sql | 451 +---------------- ...eUpdate(SqlServer.2019.MS.LinqService).sql | 450 +---------------- ...eRecord(SqlServer.2019.MS.LinqService).sql | 452 +---------------- ...houtOld(SqlServer.2019.MS.LinqService).sql | 450 +---------------- ...eUpdate(SqlServer.2019.MS.LinqService).sql | 449 +---------------- ...eRecord(SqlServer.2019.MS.LinqService).sql | 451 +---------------- ...stAsync(SqlServer.2019.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2019.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2019.MS.LinqService).sql | 456 +----------------- ...stAsync(SqlServer.2019.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2019.MS.LinqService).sql | 451 +---------------- ...eUpdate(SqlServer.2019.MS.LinqService).sql | 450 +---------------- ...eRecord(SqlServer.2019.MS.LinqService).sql | 452 +---------------- ...houtOld(SqlServer.2019.MS.LinqService).sql | 450 +---------------- ...eUpdate(SqlServer.2019.MS.LinqService).sql | 449 +---------------- ...eRecord(SqlServer.2019.MS.LinqService).sql | 451 +---------------- ...stAsync(SqlServer.2019.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2019.MS.LinqService).sql | 233 +-------- ...eRecord(SqlServer.2019.MS.LinqService).sql | 233 +-------- ...stAsync(SqlServer.2019.MS.LinqService).sql | 229 +-------- ...eRecord(SqlServer.2019.MS.LinqService).sql | 229 +-------- ...houtOld(SqlServer.2019.MS.LinqService).sql | 228 +-------- ...eRecord(SqlServer.2019.MS.LinqService).sql | 228 +-------- ...toAsync(SqlServer.2019.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2019.MS.LinqService).sql | 22 + ...stAsync(SqlServer.2019.MS.LinqService).sql | 234 +-------- ...eRecord(SqlServer.2019.MS.LinqService).sql | 234 +-------- ...stAsync(SqlServer.2019.MS.LinqService).sql | 230 +-------- ...eRecord(SqlServer.2019.MS.LinqService).sql | 230 +-------- ...houtOld(SqlServer.2019.MS.LinqService).sql | 229 +-------- ...eRecord(SqlServer.2019.MS.LinqService).sql | 229 +-------- ...toAsync(SqlServer.2019.MS.LinqService).sql | 22 + ...inq.AsyncTests.Test(SqlServer.2019.MS).sql | 18 + ...nq.AsyncTests.Test1(SqlServer.2019.MS).sql | 9 + ...ncTests.TestForEach(SqlServer.2019.MS).sql | 9 + ...s.Linq.AsyncTests.Test(SqlServer.2019).sql | 18 + ....Linq.AsyncTests.Test1(SqlServer.2019).sql | 9 + ...AsyncTests.TestForEach(SqlServer.2019).sql | 9 + 312 files changed, 7986 insertions(+), 22538 deletions(-) create mode 100644 SqlServer.2019.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.LinqService,False).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.LinqService,True).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.LinqService,False).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.LinqService,True).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.LinqService,False).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.LinqService,True).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.LinqService,False).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.LinqService,True).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.LinqService,False).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.LinqService,True).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.LinqService,False).sql create mode 100644 SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.LinqService,True).sql create mode 100644 SqlServer.2019.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2019.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.MS.LinqService,False).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.MS.LinqService,True).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.MS.LinqService,False).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.MS.LinqService,True).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.MS.LinqService,False).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.MS.LinqService,True).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.MS.LinqService,False).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.MS.LinqService,True).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.MS.LinqService,False).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.MS.LinqService,True).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.MS.LinqService,False).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.MS.LinqService,True).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2019.MS.LinqService).sql create mode 100644 SqlServer.2019.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2019.MS).sql create mode 100644 SqlServer.2019.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2019.MS).sql create mode 100644 SqlServer.2019.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2019.MS).sql create mode 100644 SqlServer.2019/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2019).sql create mode 100644 SqlServer.2019/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2019).sql create mode 100644 SqlServer.2019/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2019).sql diff --git a/SqlServer.2019.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..7255eb4fea4d --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.2019.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..b1232407f83f --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..1c7cd6188471 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2019.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..b7c56aa92fe5 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2019.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..1c7cd6188471 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2019.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..b7c56aa92fe5 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2019.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..a45e2cb909ce --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2019.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..eaf0be016b5e --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2019.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2019.LinqService).sql index fadff36ecafe..91219183fbdd 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2019.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..e68929de70c9 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2019.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..c1c91a11e550 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2019.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..c1c91a11e550 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2019.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..cb9079674707 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2019.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..cb9079674707 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2019.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..24b70ccab7da --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2019.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..fd2363e8f533 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..690899b324bf --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2019.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..6ca6a84a83b2 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2019.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..6ca6a84a83b2 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2019.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..a924bfb2cb36 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2019.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..a924bfb2cb36 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2019.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..2bf0f377eb66 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2019.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..2bf0f377eb66 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2019.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2019.LinqService).sql index 56affd7e00ef..39bd4709c11a 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2019.LinqService).sql @@ -1,161 +1,15 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2019.LinqService).sql index 56affd7e00ef..ea5c49cd8ba2 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2019.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2019.LinqService).sql index 56affd7e00ef..effc5959dcd3 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2019.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2019.LinqService).sql index 56affd7e00ef..effc5959dcd3 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2019.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2019.LinqService).sql index 56affd7e00ef..ea5c49cd8ba2 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2019.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2019.LinqService).sql index 56affd7e00ef..917595329350 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2019.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2019.LinqService).sql index 56affd7e00ef..81267f29c4c8 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2019.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2019.LinqService).sql index 56affd7e00ef..412aa4f1965f 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2019.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2019.LinqService).sql index 56affd7e00ef..412aa4f1965f 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2019.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2019.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..a4666d7a8ab9 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2019.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2019.LinqService).sql index 8c54a52d7309..d1e739129fe7 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2019.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2019 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019 diff --git a/SqlServer.2019.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2019.LinqService).sql index 3461f1ad108c..d44060128205 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2019.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2019 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019 diff --git a/SqlServer.2019.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..1fb9c91d9b86 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..9acd24e97e2f --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2019.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..d2b009a94359 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2019.LinqService).sql index b7af3d869440..8b627361f79f 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2019.LinqService).sql @@ -1,43 +1,11 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicParent] +-- SqlServer.2019 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2019.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2019.LinqService).sql index 05c20184a626..80c334d2e0d9 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2019.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2019 (asynchronously) diff --git a/SqlServer.2019.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2019.LinqService).sql index 0132beba50d0..488737f26a15 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2019.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2019 (asynchronously) diff --git a/SqlServer.2019.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..7294111dab10 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2019.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..e0549f83a35a --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2019.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..c1604e37b504 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2019.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..058b3a4ec241 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2019.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..3f2b67555e20 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2019.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.LinqService,False).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.LinqService,False).sql new file mode 100644 index 000000000000..23e7569c62ca --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.LinqService,True).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.LinqService,True).sql new file mode 100644 index 000000000000..23e7569c62ca --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.LinqService,False).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.LinqService,False).sql new file mode 100644 index 000000000000..23e7569c62ca --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.LinqService,True).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.LinqService,True).sql new file mode 100644 index 000000000000..23e7569c62ca --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2019.LinqService).sql index 8bc30e271732..240041256189 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2019.LinqService).sql @@ -1,75 +1,13 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SqlServer.2019 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.LinqService,False).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.LinqService,False).sql index d91be1be55ca..9add44db0d8f 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.LinqService,False).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.LinqService,True).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.LinqService,True).sql index eb4dcb4ca1b0..db189222f380 100644 --- a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.LinqService,True).sql +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.LinqService,False).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.LinqService,False).sql new file mode 100644 index 000000000000..8d4bd6188f8e --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.LinqService,True).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.LinqService,True).sql new file mode 100644 index 000000000000..8d4bd6188f8e --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.LinqService,False).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.LinqService,False).sql new file mode 100644 index 000000000000..441dbe4ca140 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.LinqService,True).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.LinqService,True).sql new file mode 100644 index 000000000000..482e80d3858a --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.LinqService,False).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.LinqService,False).sql new file mode 100644 index 000000000000..bd963b46245a --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.LinqService,True).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.LinqService,True).sql new file mode 100644 index 000000000000..c2d1a03b90af --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.LinqService,False).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.LinqService,False).sql new file mode 100644 index 000000000000..bedb5b57fa7b --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.LinqService,True).sql b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.LinqService,True).sql new file mode 100644 index 000000000000..8dfe8f0a646c --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,False,False).sql b/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,False,False).sql index 052d42b2b5ff..bddc25df5a47 100644 --- a/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,False,False).sql +++ b/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2019 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,False,True).sql b/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,False,True).sql index 1b1db76aec95..78e0490b1d69 100644 --- a/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,False,True).sql +++ b/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,False,True).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2019 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,True,False).sql b/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,True,False).sql index 64f63c9d9f00..a0eacf8f3db9 100644 --- a/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,True,False).sql +++ b/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,True,False).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2019 (asynchronously) + +CREATE TABLE [TestData]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,True,True).sql b/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,True,True).sql index 0f92eae2c33e..38046698eef7 100644 --- a/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,True,True).sql +++ b/SqlServer.2019.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.LinqService,False,True,True).sql @@ -19,3 +19,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2019 (asynchronously) + +CREATE TABLE [TestData].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..c5d854fe88e0 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2019.LinqService).sql index 1237d100f99b..4ffefd146a31 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2019.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2019 SELECT @@ -7,3 +33,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..abac0648f145 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2019.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.LinqService,100).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.LinqService,100).sql index fa36151c6327..88fe49665695 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.LinqService,100).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.LinqService,100).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.LinqService,200).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.LinqService,200).sql index fa36151c6327..88fe49665695 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.LinqService,200).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.LinqService,200).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.LinqService,100).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.LinqService,100).sql index 40e1327f8508..048be4571461 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.LinqService,100).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.LinqService,200).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.LinqService,200).sql index 40e1327f8508..048be4571461 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.LinqService,200).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.LinqService,100).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.LinqService,100).sql index fa36151c6327..074c6c489c79 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.LinqService,100).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.LinqService,200).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.LinqService,200).sql index fa36151c6327..034ea816fb52 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.LinqService,200).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,100).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,100).sql index 40e1327f8508..14326920aa6c 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,100).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,200).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,200).sql index 40e1327f8508..bb4c25e73f1e 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,200).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.LinqService,100).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.LinqService,100).sql index f42aebb5ef16..365b866f6e35 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.LinqService,100).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2019 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.LinqService,200).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.LinqService,200).sql index f42aebb5ef16..bee8940f1479 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.LinqService,200).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2019 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.LinqService,100).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.LinqService,100).sql index fa36151c6327..9783505cbdfe 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.LinqService,100).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.LinqService,200).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.LinqService,200).sql index fa36151c6327..9783505cbdfe 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.LinqService,200).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,100).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,100).sql index 40e1327f8508..32c3f0371425 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,100).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,200).sql b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,200).sql index 40e1327f8508..32c3f0371425 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,200).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..0ea2cfbfd154 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..3de37f2084ea --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..3de37f2084ea --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2019.LinqService).sql index 1e03fd52a6a7..e40086cfb41f 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2019.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,32 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2019.LinqService).sql index 8249fa9a5caa..8050cfeedd24 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2019.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..75dbfbe3bf9e --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2019.LinqService).sql @@ -0,0 +1,149 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2019.LinqService).sql index 8249fa9a5caa..1afcf82aa7d9 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2019.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2019.LinqService).sql index 8249fa9a5caa..bf6c5570b9a6 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2019.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2019.LinqService).sql index cb5081a0dc39..f2c763c8d931 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2019.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2019 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2019.LinqService).sql index cb5081a0dc39..f2c763c8d931 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2019.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2019 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2019.LinqService).sql index ad7ff2140ac6..1e9b66849bad 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2019.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2019 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2019 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.LinqService,1).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.LinqService,1).sql index 285e0c1411dd..f211b71f2514 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.LinqService,1).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019 +-- SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.LinqService,2).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.LinqService,2).sql index 285e0c1411dd..b77f0462b8e5 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.LinqService,2).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019 +-- SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,1).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,1).sql index 285e0c1411dd..d13b476f2387 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,1).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019 +-- SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,2).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,2).sql index 285e0c1411dd..c2f23016fe9c 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,2).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019 +-- SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.LinqService,100).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.LinqService,100).sql index 9eea29de9cc0..a3ed9ef1b1e0 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.LinqService,100).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.LinqService,200).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.LinqService,200).sql index d2b60600534a..a2391352184b 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.LinqService,200).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.LinqService,100).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.LinqService,100).sql index 450ef5da8030..041956d21d9b 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.LinqService,100).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.LinqService,200).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.LinqService,200).sql index ea09e1508d2b..bd6e6d53fc61 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.LinqService,200).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.LinqService,1).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.LinqService,1).sql index 285e0c1411dd..e0e272f0e79c 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.LinqService,1).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019 +-- SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.LinqService,2).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.LinqService,2).sql index 285e0c1411dd..7bd862a0778f 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.LinqService,2).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019 +-- SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,1).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,1).sql index 285e0c1411dd..d13b476f2387 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,1).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019 +-- SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,2).sql b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,2).sql index 285e0c1411dd..c2f23016fe9c 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,2).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019 +-- SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2019.LinqService).sql index 8b57e36e8ffb..b6ca03d86647 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2019.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2019.LinqService).sql index 8b57e36e8ffb..630c1b7a7bd9 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2019.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2019.LinqService).sql index 1dbb437b0587..8048f74d75f2 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2019.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2019 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2019.LinqService).sql index 1dbb437b0587..7c3409cbe48d 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2019.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2019 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..02e44bb6b23e --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..b33a2ed173cb --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..b33a2ed173cb --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..3cf025bdd6a7 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..68ddd912dc2b --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2019.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..68ddd912dc2b --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2019.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2019.LinqService).sql new file mode 100644 index 000000000000..3c9f910e8f55 --- /dev/null +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2019.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2019.LinqService).sql index 6aaf2a58e3ba..ae5e7f50660c 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2019.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql index 7538e84b5192..7414532414b2 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2019 SELECT diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql index 6048998b6396..c380c9c0e45d 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql index 6048998b6396..9dcd86bbbcd7 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2019.LinqService).sql index 70a93320cc1e..241d2ba3ddba 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2019.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2019 SELECT diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql index 6048998b6396..f75972c4f8b0 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.LinqService).sql index 6048998b6396..85bb9a82e42c 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql index 6048998b6396..3e64385199cf 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql index 6048998b6396..7625ae4909dd 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.LinqService).sql index 6048998b6396..519eab269f36 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql index 6048998b6396..1d0548136a1c 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql index 7538e84b5192..7414532414b2 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2019 SELECT diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql index 6048998b6396..c380c9c0e45d 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql index 6048998b6396..9dcd86bbbcd7 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2019.LinqService).sql index 70a93320cc1e..241d2ba3ddba 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2019.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2019 SELECT diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql index 6048998b6396..f75972c4f8b0 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.LinqService).sql index 6048998b6396..85bb9a82e42c 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql index 6048998b6396..3e64385199cf 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql index 6048998b6396..7625ae4909dd 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.LinqService).sql index 6048998b6396..519eab269f36 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql index 6048998b6396..1d0548136a1c 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql index 4dbb672cc517..56d7a5b44d52 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2019 SELECT diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql index 6e7dd7578111..e1cd3cbc7b2e 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql index 6e7dd7578111..4d5722fecab2 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql index 6e7dd7578111..3fab84e50671 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql index 6e7dd7578111..127b38acf555 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql index 6e7dd7578111..745fa58f32c6 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.LinqService).sql index 6e7dd7578111..afb0c0fcf763 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2019.LinqService).sql index 4dbb672cc517..04cdbac3b19b 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2019.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2019 SELECT diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql index 4dbb672cc517..ef1ca7e3a166 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2019.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2019 SELECT diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql index 6e7dd7578111..b1b5dc25c135 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2019.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql index 6e7dd7578111..c0a4835b02d0 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql index 6e7dd7578111..82a324f971d4 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2019.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql index 6e7dd7578111..c1dcf5e8a715 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql index 6e7dd7578111..9970a656c8e4 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.LinqService).sql index 6e7dd7578111..95e387ccf237 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2019.LinqService).sql b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2019.LinqService).sql index 4dbb672cc517..3be800a1aeb1 100644 --- a/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2019.LinqService).sql +++ b/SqlServer.2019.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2019.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2019 SELECT diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..caef66112d6d --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..119c61fa0a94 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..ec22b2d5640f --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..552c61cbc244 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..ec22b2d5640f --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..552c61cbc244 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..efa051ce8554 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..d310bf9feaf2 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2019.MS.LinqService).sql index e46e2a4edd9f..ee152115cd17 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2019.MS.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..ec2e0e0668bc --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..1c711284f8ae --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..1c711284f8ae --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..454b2c358747 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..454b2c358747 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..8c1a58e9fefd --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..cf31b8a91ebb --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..899ab1a292b9 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..c5967971a367 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..c5967971a367 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..e65e2a0ec58d --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..e65e2a0ec58d --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..ffb45f9f35b6 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..ffb45f9f35b6 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2019.MS.LinqService).sql index de48f8189365..a1987e3a49b0 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2019.MS.LinqService).sql @@ -1,161 +1,15 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2019.MS.LinqService).sql index de48f8189365..665da608a1a4 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2019.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2019.MS.LinqService).sql index de48f8189365..891388dd30b0 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2019.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2019.MS.LinqService).sql index de48f8189365..891388dd30b0 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2019.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2019.MS.LinqService).sql index de48f8189365..665da608a1a4 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2019.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2019.MS.LinqService).sql index de48f8189365..95fd6b56a37e 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2019.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2019.MS.LinqService).sql index de48f8189365..9b2d629bd383 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2019.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2019.MS.LinqService).sql index de48f8189365..8084c0f3c11e 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2019.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2019.MS.LinqService).sql index de48f8189365..8084c0f3c11e 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2019.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..46b007f07375 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2019.MS.LinqService).sql index abdaf84189f6..5e484f115778 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2019.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2019.MS.LinqService).sql index ef17129d8fa9..61a94cda875e 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2019.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..374a8e985503 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..abfc1554a2cb --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..188207294dad --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2019.MS.LinqService).sql index 798ff24931f2..fbd16dbb896d 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2019.MS.LinqService).sql @@ -1,43 +1,11 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicParent] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2019.MS.LinqService).sql index 77d8de9d86d6..1e8ab22a8fcf 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2019.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2019.MS SqlServer.2019 (asynchronously) diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2019.MS.LinqService).sql index f5c6917c6765..aeee7c2c53d6 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2019.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2019.MS SqlServer.2019 (asynchronously) diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..3b35f9d6b261 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..02a3c53c2c8c --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..47531cca908b --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..0539852fc2b7 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..38ae3f151bcd --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.MS.LinqService,False).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.MS.LinqService,False).sql new file mode 100644 index 000000000000..14d3dd83edd4 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.MS.LinqService,True).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.MS.LinqService,True).sql new file mode 100644 index 000000000000..14d3dd83edd4 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2019.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.MS.LinqService,False).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.MS.LinqService,False).sql new file mode 100644 index 000000000000..14d3dd83edd4 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.MS.LinqService,True).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.MS.LinqService,True).sql new file mode 100644 index 000000000000..14d3dd83edd4 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2019.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2019.MS.LinqService).sql index 2c1088943c80..b0adef93ccbc 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2019.MS.LinqService).sql @@ -1,75 +1,13 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.MS.LinqService,False).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.MS.LinqService,False).sql index bf056d9c0fa8..cbab5f12e796 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.MS.LinqService,False).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.MS.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.MS.LinqService,True).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.MS.LinqService,True).sql index fef114c26b8f..46c86b772cb5 100644 --- a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.MS.LinqService,True).sql +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2019.MS.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.MS.LinqService,False).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.MS.LinqService,False).sql new file mode 100644 index 000000000000..62f119f2d32f --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.MS.LinqService,True).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.MS.LinqService,True).sql new file mode 100644 index 000000000000..62f119f2d32f --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2019.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.MS.LinqService,False).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.MS.LinqService,False).sql new file mode 100644 index 000000000000..fd2a43b21f81 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.MS.LinqService,True).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.MS.LinqService,True).sql new file mode 100644 index 000000000000..d98be0cf8a8d --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2019.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.MS.LinqService,False).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.MS.LinqService,False).sql new file mode 100644 index 000000000000..386196932f1d --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.MS.LinqService,True).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.MS.LinqService,True).sql new file mode 100644 index 000000000000..df2b50315ca9 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2019.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.MS.LinqService,False).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.MS.LinqService,False).sql new file mode 100644 index 000000000000..f5e4d2b0180a --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.MS.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.MS.LinqService,True).sql b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.MS.LinqService,True).sql new file mode 100644 index 000000000000..c73d986fc723 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2019.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,False,False).sql b/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,False,False).sql index e4641354b347..47c0d2ef62c1 100644 --- a/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,False,False).sql +++ b/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,False,True).sql b/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,False,True).sql index f59c6fa8cf58..9f1af72b3282 100644 --- a/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,False,True).sql +++ b/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,False,True).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,True,False).sql b/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,True,False).sql index cf023d9e6abf..5d65125fa30e 100644 --- a/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,True,False).sql +++ b/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,True,False).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [TestDataMS]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,True,True).sql b/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,True,True).sql index 9c44cc7ffafc..92eaf4a77dd3 100644 --- a/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,True,True).sql +++ b/SqlServer.2019.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2019.MS.LinqService,False,True,True).sql @@ -19,3 +19,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [TestDataMS].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..d7f79a1dae31 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2019.MS.LinqService).sql index d3f584033bd5..13f4c91160b4 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2019.MS.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 SELECT @@ -7,3 +33,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..7284ec569706 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.MS.LinqService,100).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.MS.LinqService,100).sql index ccc1695e129d..8ae4fdfd242f 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.MS.LinqService,100).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.MS.LinqService,100).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.MS.LinqService,200).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.MS.LinqService,200).sql index ccc1695e129d..8ae4fdfd242f 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.MS.LinqService,200).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2019.MS.LinqService,200).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,100).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,100).sql index 7a84192d4420..98cc53bc93e8 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,100).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,200).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,200).sql index 7a84192d4420..98cc53bc93e8 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,200).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.MS.LinqService,100).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.MS.LinqService,100).sql index ccc1695e129d..692c33f924b9 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.MS.LinqService,100).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.MS.LinqService,200).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.MS.LinqService,200).sql index ccc1695e129d..aa69c0d8d8b8 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.MS.LinqService,200).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2019.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,100).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,100).sql index 7a84192d4420..0cb296e65029 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,100).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,200).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,200).sql index 7a84192d4420..e709b83507cd 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,200).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.MS.LinqService,100).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.MS.LinqService,100).sql index d9871c37779a..3c3a10ca618c 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.MS.LinqService,100).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.MS.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.MS.LinqService,200).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.MS.LinqService,200).sql index d9871c37779a..7190878842bd 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.MS.LinqService,200).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2019.MS.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.MS.LinqService,100).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.MS.LinqService,100).sql index ccc1695e129d..b3a6476604e1 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.MS.LinqService,100).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.MS.LinqService,200).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.MS.LinqService,200).sql index ccc1695e129d..b3a6476604e1 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.MS.LinqService,200).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2019.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,100).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,100).sql index 7a84192d4420..6e64c9a845d1 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,100).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,200).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,200).sql index 7a84192d4420..6e64c9a845d1 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,200).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2019.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..c5e4193612f8 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..2ce96483fb7e --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..2ce96483fb7e --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2019.MS.LinqService).sql index 8a7185be97c3..d20e3644f137 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2019.MS.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,32 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2019.MS.LinqService).sql index cac2b6a82801..7dd1b367867c 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2019.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..632011145149 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,149 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2019.MS.LinqService).sql index cac2b6a82801..c694af7e3824 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2019.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2019.MS.LinqService).sql index cac2b6a82801..c2388dd3be61 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2019.MS.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2019.MS.LinqService).sql index 9b9c8e8e6184..74ca3c8edf7b 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2019.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2019.MS.LinqService).sql index 9b9c8e8e6184..74ca3c8edf7b 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2019.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2019.MS.LinqService).sql index 3ac0f4f1ef1a..6ece5543bf46 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2019.MS.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,1).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,1).sql index efda0e757c8b..9eef94dae04b 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,1).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,2).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,2).sql index efda0e757c8b..10dc47b00537 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,2).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,1).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,1).sql index efda0e757c8b..d535db4aeeb2 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,1).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,2).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,2).sql index efda0e757c8b..5c18f4de24aa 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,2).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.MS.LinqService,100).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.MS.LinqService,100).sql index d07435652346..9483055373c6 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.MS.LinqService,100).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.MS.LinqService,200).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.MS.LinqService,200).sql index c13d5d35e085..8e61cf66f358 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.MS.LinqService,200).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2019.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.MS.LinqService,100).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.MS.LinqService,100).sql index af65d58b61ba..292a9525b0aa 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.MS.LinqService,100).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.MS.LinqService,200).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.MS.LinqService,200).sql index 74ba8ae9d570..0ee990ebcd51 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.MS.LinqService,200).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2019.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,1).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,1).sql index efda0e757c8b..28bbd5790e1f 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,1).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,2).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,2).sql index efda0e757c8b..6b7aa1963c13 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,2).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2019.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,1).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,1).sql index efda0e757c8b..d535db4aeeb2 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,1).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,2).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,2).sql index efda0e757c8b..5c18f4de24aa 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,2).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2019.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2019.MS.LinqService).sql index b5196315609d..68114140130d 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2019.MS.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2019.MS.LinqService).sql index b5196315609d..92031f4ea68f 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2019.MS.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2019.MS.LinqService).sql index e1fa8cbbaf05..86569d9d1b6d 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2019.MS.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2019.MS.LinqService).sql index e1fa8cbbaf05..aed327d8c374 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2019.MS.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2019.MS SqlServer.2019 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..caac3a6fa938 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..b8993da946e5 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..b8993da946e5 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..62d50672b2ec --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..bd2b7f35aac6 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..bd2b7f35aac6 --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2019.MS.LinqService).sql new file mode 100644 index 000000000000..ccdfe195f18f --- /dev/null +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2019.MS.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2019.MS.LinqService).sql index 31c7acfbefba..bfa4accf702e 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2019.MS.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql index 93cff492540f..b50c93d16fd4 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 SELECT diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..53e244df1e17 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..479731201889 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql index 25aaae0115b4..436dcba63099 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 SELECT diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..037f733df306 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..46577a71b737 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..6d8662e7c5d0 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..4575c8555c5e 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..a2d128fab0de 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..56cd868f33e2 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql index 93cff492540f..b50c93d16fd4 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 SELECT diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..53e244df1e17 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..479731201889 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql index 25aaae0115b4..436dcba63099 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 SELECT diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..037f733df306 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..46577a71b737 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..6d8662e7c5d0 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..4575c8555c5e 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..a2d128fab0de 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql index 6265f15d2561..56cd868f33e2 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2019.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql index f86c082ac097..a58d55e55c32 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 SELECT diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql index e97ab40f1ec2..6a321a9a0c3a 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql index e97ab40f1ec2..6336d29103f8 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql index e97ab40f1ec2..f29edd1b50f6 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql index e97ab40f1ec2..e7f93c8886a5 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql index e97ab40f1ec2..ea163cf73d80 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.MS.LinqService).sql index e97ab40f1ec2..80ca459e9200 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.MS.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2019.MS.LinqService).sql index f86c082ac097..939387679ce0 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2019.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 SELECT diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql index f86c082ac097..b5d4458af60b 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 SELECT diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql index e97ab40f1ec2..d8b191c35a46 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql index e97ab40f1ec2..18fe075eeccb 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql index e97ab40f1ec2..ac3494720e90 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2019.MS.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql index e97ab40f1ec2..4745353163ad 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2019.MS.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql index e97ab40f1ec2..000161a73ade 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2019.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.MS.LinqService).sql index e97ab40f1ec2..33bb7670a092 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2019.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2019.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2019.MS.LinqService).sql b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2019.MS.LinqService).sql index f86c082ac097..2c1306742ecb 100644 --- a/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2019.MS.LinqService).sql +++ b/SqlServer.2019.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2019.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2019.MS SqlServer.2019 SELECT diff --git a/SqlServer.2019.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2019.MS).sql b/SqlServer.2019.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2019.MS).sql new file mode 100644 index 000000000000..364bfc3124f8 --- /dev/null +++ b/SqlServer.2019.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2019.MS).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2019.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2019.MS).sql b/SqlServer.2019.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2019.MS).sql new file mode 100644 index 000000000000..ec22b2d5640f --- /dev/null +++ b/SqlServer.2019.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2019.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2019.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2019.MS).sql b/SqlServer.2019.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2019.MS).sql new file mode 100644 index 000000000000..ec22b2d5640f --- /dev/null +++ b/SqlServer.2019.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2019.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2019.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2019/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2019).sql b/SqlServer.2019/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2019).sql new file mode 100644 index 000000000000..f0a8c4f3e659 --- /dev/null +++ b/SqlServer.2019/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2019).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2019/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2019).sql b/SqlServer.2019/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2019).sql new file mode 100644 index 000000000000..1c7cd6188471 --- /dev/null +++ b/SqlServer.2019/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2019).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2019/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2019).sql b/SqlServer.2019/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2019).sql new file mode 100644 index 000000000000..1c7cd6188471 --- /dev/null +++ b/SqlServer.2019/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2019).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From 4c0ac71e6eee71d10b8cfa5a102e23399dcb674f Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:41:21 +0000 Subject: [PATCH 12/40] [Linux / Firebird 4.0] baselines --- ...ests.All4Async(Firebird.4.LinqService).sql | 14 + ....GroupBy2Async(Firebird.4.LinqService).sql | 30 + ...numerable1Test(Firebird.4.LinqService).sql | 9 + ...numerable2Test(Firebird.4.LinqService).sql | 11 + ...rableCast1Test(Firebird.4.LinqService).sql | 9 + ...rableCast2Test(Firebird.4.LinqService).sql | 11 + ...tainsAsyncTest(Firebird.4.LinqService).sql | 16 + ...FirstAsyncTest(Firebird.4.LinqService).sql | 15 + ...s.TakeSkipTest(Firebird.4.LinqService).sql | 16 + ...FirstOrDefault(Firebird.4.LinqService).sql | 20 + ...ookupAsyncTest(Firebird.4.LinqService).sql | 21 + ...ementAsyncTest(Firebird.4.LinqService).sql | 21 + ...s.AnyTestAsync(Firebird.4.LinqService).sql | 32 ++ ....AnyTestAsync2(Firebird.4.LinqService).sql | 32 ++ ...ethoAsyncdTest(Firebird.4.LinqService).sql | 16 + ...iledTest3Async(Firebird.4.LinqService).sql | 28 + ...tainsTestAsync(Firebird.4.LinqService).sql | 32 ++ ...CountTestAsync(Firebird.4.LinqService).sql | 24 + ...ountTestAsync2(Firebird.4.LinqService).sql | 24 + ...mentTestAsync1(Firebird.4.LinqService).sql | 28 + ...mentTestAsync2(Firebird.4.LinqService).sql | 28 + ...s.MaxTestAsync(Firebird.4.LinqService).sql | 24 + ....MaxTestAsync2(Firebird.4.LinqService).sql | 24 + ...PredicateAsync(Firebird.4.LinqService).sql | 183 +------ ...PredicateAsync(Firebird.4.LinqService).sql | 179 +----- ...PredicateAsync(Firebird.4.LinqService).sql | 181 +----- ...PredicateAsync(Firebird.4.LinqService).sql | 181 +----- ...PredicateAsync(Firebird.4.LinqService).sql | 179 +----- ...xSelectorAsync(Firebird.4.LinqService).sql | 179 +----- ...nSelectorAsync(Firebird.4.LinqService).sql | 179 +----- ...PredicateAsync(Firebird.4.LinqService).sql | 181 +----- ...PredicateAsync(Firebird.4.LinqService).sql | 181 +----- ...s.Concat1Async(Firebird.4.LinqService).sql | 19 + ...IncrementAsync(Firebird.4.LinqService).sql | 97 ++++ ...tFilteredAsync(Firebird.4.LinqService).sql | 80 +++ ...ts.Count1Async(Firebird.4.LinqService).sql | 8 + ...ts.Count2Async(Firebird.4.LinqService).sql | 10 + ...QueryMax1Async(Firebird.4.LinqService).sql | 16 + ...ests.Issue4602(Firebird.4.LinqService).sql | 110 +--- ...ssue4057_Async(Firebird.4.LinqService).sql | 31 ++ ...citTransaction(Firebird.4.LinqService).sql | 31 ++ ...xpressionAsync(Firebird.4.LinqService).sql | 25 + ...sts.Cast1Async(Firebird.4.LinqService).sql | 11 + ...ts.Test18Async(Firebird.4.LinqService).sql | 14 + ...arameter1Async(Firebird.4.LinqService).sql | 7 + ....Issue3132Test(Firebird.4.LinqService).sql | 213 ++++++++ ...At2Async(Firebird.4.LinqService,False).sql | 16 + ...tAt2Async(Firebird.4.LinqService,True).sql | 16 + ...lt3Async(Firebird.4.LinqService,False).sql | 16 + ...ult3Async(Firebird.4.LinqService,True).sql | 16 + ...ipleSkip1Async(Firebird.4.LinqService).sql | 94 +--- ...ke1Async(Firebird.4.LinqService,False).sql | 20 + ...ake1Async(Firebird.4.LinqService,True).sql | 24 + ...ke2Async(Firebird.4.LinqService,False).sql | 12 + ...ake2Async(Firebird.4.LinqService,True).sql | 12 + ...ke3Async(Firebird.4.LinqService,False).sql | 12 + ...ake3Async(Firebird.4.LinqService,True).sql | 14 + ...ke4Async(Firebird.4.LinqService,False).sql | 12 + ...ake4Async(Firebird.4.LinqService,True).sql | 14 + ...ke5Async(Firebird.4.LinqService,False).sql | 10 + ...ake5Async(Firebird.4.LinqService,True).sql | 12 + ...ebird.4.LinqService,False,False,False).sql | 19 + ...rebird.4.LinqService,False,False,True).sql | 19 + ...rebird.4.LinqService,False,True,False).sql | 19 + ...irebird.4.LinqService,False,True,True).sql | 19 + ...rebird.4.LinqService,True,False,False).sql | 19 + ...irebird.4.LinqService,True,False,True).sql | 19 + ...irebird.4.LinqService,True,True,False).sql | 19 + ...Firebird.4.LinqService,True,True,True).sql | 19 + ...ateTable1Async(Firebird.4.LinqService).sql | 59 ++ ...eateTableAsync(Firebird.4.LinqService).sql | 41 ++ ...TableNameAsync(Firebird.4.LinqService).sql | 114 ++++ ...ngleRecord(Firebird.4.LinqService,100).sql | 12 + ...ngleRecord(Firebird.4.LinqService,200).sql | 12 + ...ngleRecord(Firebird.4.LinqService,100).sql | 14 + ...ngleRecord(Firebird.4.LinqService,200).sql | 14 + ...ngleRecord(Firebird.4.LinqService,100).sql | 11 + ...ngleRecord(Firebird.4.LinqService,200).sql | 11 + ...s.Insert2Async(Firebird.4.LinqService).sql | 44 ++ ...s.Insert3Async(Firebird.4.LinqService).sql | 46 ++ ...s.Insert4Async(Firebird.4.LinqService).sql | 46 ++ ...TableNameAsync(Firebird.4.LinqService).sql | 94 ++++ ...rReplace1Async(Firebird.4.LinqService).sql | 98 ++++ ...TableNameAsync(Firebird.4.LinqService).sql | 155 ++++++ ...OrUpdate3Async(Firebird.4.LinqService).sql | 98 ++++ ...rUpdate3xAsync(Firebird.4.LinqService).sql | 104 ++++ ...Identity1Async(Firebird.4.LinqService).sql | 15 + ...Identity2Async(Firebird.4.LinqService).sql | 15 + ...Identity4Async(Firebird.4.LinqService).sql | 34 ++ ...ObjAsyncTest(Firebird.4.LinqService,1).sql | 51 +- ...ObjAsyncTest(Firebird.4.LinqService,2).sql | 51 +- ...terAsyncTest(Firebird.4.LinqService,1).sql | 51 +- ...terAsyncTest(Firebird.4.LinqService,2).sql | 51 +- ...ngleRecord(Firebird.4.LinqService,100).sql | 24 + ...ngleRecord(Firebird.4.LinqService,200).sql | 24 + ...ObjAsyncTest(Firebird.4.LinqService,1).sql | 51 +- ...ObjAsyncTest(Firebird.4.LinqService,2).sql | 51 +- ...terAsyncTest(Firebird.4.LinqService,1).sql | 51 +- ...terAsyncTest(Firebird.4.LinqService,2).sql | 51 +- ...outActionAsync(Firebird.4.LinqService).sql | 52 ++ ...tFromQueryAsyn(Firebird.4.LinqService).sql | 39 ++ ...tFromTableAsyn(Firebird.4.LinqService).sql | 37 ++ ....Update12Async(Firebird.4.LinqService).sql | 28 + ...s.Update1Async(Firebird.4.LinqService).sql | 54 ++ ...s.Update2Async(Firebird.4.LinqService).sql | 54 ++ ...s.Update4Async(Firebird.4.LinqService).sql | 63 +++ ...ociation1Async(Firebird.4.LinqService).sql | 47 ++ ...ation1AsyncOld(Firebird.4.LinqService).sql | 47 ++ ...TableNameAsync(Firebird.4.LinqService).sql | 132 +++++ ...eComplex1Async(Firebird.4.LinqService).sql | 57 ++ ...ncSingleRecord(Firebird.4.LinqService).sql | 517 +++--------------- ...teSingleRecord(Firebird.4.LinqService).sql | 513 ++--------------- ...teSingleRecord(Firebird.4.LinqService).sql | 512 ++--------------- ...ncSingleRecord(Firebird.4.LinqService).sql | 517 +++--------------- ...teSingleRecord(Firebird.4.LinqService).sql | 513 ++--------------- ...teSingleRecord(Firebird.4.LinqService).sql | 512 ++--------------- ...ncSingleRecord(Firebird.4.LinqService).sql | 243 +------- ...ncSingleRecord(Firebird.4.LinqService).sql | 239 +------- ...ldSingleRecord(Firebird.4.LinqService).sql | 238 +------- ...ncSingleRecord(Firebird.4.LinqService).sql | 244 +-------- ...ncSingleRecord(Firebird.4.LinqService).sql | 240 +------- ...ldSingleRecord(Firebird.4.LinqService).sql | 239 +------- ...Tests.Linq.AsyncTests.Test(Firebird.4).sql | 18 + ...ests.Linq.AsyncTests.Test1(Firebird.4).sql | 9 + ...inq.AsyncTests.TestForEach(Firebird.4).sql | 9 + 125 files changed, 3871 insertions(+), 6027 deletions(-) create mode 100644 Firebird.4.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.4.LinqService,False).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.4.LinqService,True).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.4.LinqService,False).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.4.LinqService,True).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.4.LinqService,False).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.4.LinqService,True).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.4.LinqService,False).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.4.LinqService,True).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.4.LinqService,False).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.4.LinqService,True).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.4.LinqService,False).sql create mode 100644 Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.4.LinqService,True).sql create mode 100644 Firebird.4.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.4.LinqService).sql create mode 100644 Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.4.LinqService).sql create mode 100644 Firebird.4/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.4).sql create mode 100644 Firebird.4/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.4).sql create mode 100644 Firebird.4/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.4).sql diff --git a/Firebird.4.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..dd138ca9e6c7 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Firebird.4.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" <= 3 + ) +FROM rdb$database + diff --git a/Firebird.4.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..3756056d19e6 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Firebird.4.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT DISTINCT + "a_Parent1"."ParentID" + FROM + "Child" "t1" + INNER JOIN "Parent" "a_Parent1" ON "t1"."ParentID" = "a_Parent1"."ParentID" + ) "m_1" + INNER JOIN "Child" "d" + INNER JOIN "Parent" "a_Parent1_1" ON "d"."ParentID" = "a_Parent1_1"."ParentID" + ON "m_1"."ParentID" = "a_Parent1_1"."ParentID" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "a_Parent1"."ParentID" +FROM + "Child" "t1" + INNER JOIN "Parent" "a_Parent1" ON "t1"."ParentID" = "a_Parent1"."ParentID" +GROUP BY + "a_Parent1"."ParentID" + diff --git a/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..27494d707400 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Firebird.4.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..80a9814bc7da --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Firebird.4.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" > 1 + diff --git a/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..27494d707400 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Firebird.4.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..80a9814bc7da --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Firebird.4.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" > 1 + diff --git a/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..e41b84328592 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Firebird.4.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Person" "t1" + WHERE + CAST(@ID AS Int) = "t1"."PersonID" + ) +FROM rdb$database + diff --git a/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..c812c31154ff --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Firebird.4.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."PersonID" = 1 +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.4.LinqService).sql index 15875248fb49..b748dd4217a6 100644 --- a/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Firebird.4.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY "t1"."ParentID" OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @skip Integer -- Int32 +SET @skip = 1 +DECLARE @take Integer -- Int32 +SET @take = 2 + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" +ORDER BY + "t1"."ParentID" +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..2a56cff8e0d7 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Firebird.4.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer -- Int32 +SET @p_2 = 3 +DECLARE @param Integer -- Int32 +SET @param = 4 + +SELECT + "o"."ParentID", + "o"."Value1" +FROM + "Parent" "o" +WHERE + "o"."ParentID" IN (@p, @p_1, @p_2) OR "o"."ParentID" = @param +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..0b0203735aed --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Firebird.4.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +ORDER BY + "t1"."ParentID", + "t1"."ChildID" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..0b0203735aed --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Firebird.4.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +ORDER BY + "t1"."ParentID", + "t1"."ChildID" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..7c0a1fe70dba --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Firebird.4.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) +FROM rdb$database + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) +FROM rdb$database + diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..7c0a1fe70dba --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Firebird.4.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) +FROM rdb$database + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) +FROM rdb$database + diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..e227c23c779b --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Firebird.4.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = @p +ORDER BY + "x"."ParentID" DESC +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..efa1d9d1ecb8 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Firebird.4.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT @p ROWS ONLY + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT @p ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..a885dcdab6cd --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Firebird.4.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + CAST(@p AS Int) = "c_1"."ParentID" + ) +FROM rdb$database + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + CAST(@p AS Int) = "c_1"."ParentID" + ) +FROM rdb$database + diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..1c26ee9bcede --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Firebird.4.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..1c26ee9bcede --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Firebird.4.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..bd9aa25d5647 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Firebird.4.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..bd9aa25d5647 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Firebird.4.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..932bd9d29e83 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Firebird.4.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..932bd9d29e83 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Firebird.4.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.4.LinqService).sql index 6283f048f0a4..8e28548d8186 100644 --- a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Firebird.4.LinqService).sql @@ -1,171 +1,16 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + "AsyncDataTable" "c_1" + WHERE + "c_1"."Id" = @p + ) +FROM rdb$database diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.4.LinqService).sql index 6283f048f0a4..a1bfe0f39b55 100644 --- a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Firebird.4.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = @p diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.4.LinqService).sql index 6283f048f0a4..eacb3d0f6473 100644 --- a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Firebird.4.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 1 ROWS ONLY diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.4.LinqService).sql index 6283f048f0a4..eacb3d0f6473 100644 --- a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Firebird.4.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 1 ROWS ONLY diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.4.LinqService).sql index 6283f048f0a4..a1bfe0f39b55 100644 --- a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Firebird.4.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = @p diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.4.LinqService).sql index 6283f048f0a4..1fc61ce86aa9 100644 --- a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Firebird.4.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MAX("c_1"."Id") +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" > @p diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.4.LinqService).sql index 6283f048f0a4..11dcd6d66cc8 100644 --- a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Firebird.4.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MIN("c_1"."Id") +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" > @p diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.4.LinqService).sql index 6283f048f0a4..14eaa7c4db6c 100644 --- a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Firebird.4.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 2 ROWS ONLY diff --git a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.4.LinqService).sql index 6283f048f0a4..14eaa7c4db6c 100644 --- a/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Firebird.4.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'AsyncDataTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "AsyncDataTable"'; -END +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 2 ROWS ONLY diff --git a/Firebird.4.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..5b5b14878b9f --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Firebird.4.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" = 1 +UNION ALL +SELECT + "p_1"."ParentID", + "p_1"."Value1" +FROM + "Parent" "p_1" +WHERE + "p_1"."ParentID" = 2 + diff --git a/Firebird.4.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.4.LinqService).sql index cf3b9531b5e3..8a5498bbb9af 100644 --- a/Firebird.4.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Firebird.4.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Firebird.4 Firebird4 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.4 Firebird4 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.4 Firebird4 @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.4 Firebird4 @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" "obj" +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.4 Firebird4 @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" "obj" +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- Firebird.4 Firebird4 diff --git a/Firebird.4.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.4.LinqService).sql index 2ca0a77da98a..db35a13a7bae 100644 --- a/Firebird.4.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Firebird.4.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Firebird.4 Firebird4 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" "r" +SET + "Stamp" = "r"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "r"."Id" = 2 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.4 Firebird4 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" "r" +SET + "Stamp" = "r"."Stamp" + 1, + "Value" = CAST(@Value AS VARCHAR(7)) +WHERE + "r"."Id" = 1 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.4 Firebird4 @@ -28,6 +84,18 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" "r" +WHERE + "r"."Id" = 2 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.4 Firebird4 @@ -38,6 +106,18 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" "r" +WHERE + "r"."Id" = 1 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- Firebird.4 Firebird4 diff --git a/Firebird.4.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..b368f94843fe --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Firebird.4.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" "t1" + diff --git a/Firebird.4.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..4585f47d37d1 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Firebird.4.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 2 + diff --git a/Firebird.4.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..9566badcc768 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Firebird.4.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" "c_1" + LEFT JOIN "Parent" "a_Parent" ON "c_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "a_Parent"."ParentID" = "t1"."ParentID" + )) +FROM + "Parent" "t1" + diff --git a/Firebird.4.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.4.LinqService).sql index 46f976972fb1..bf4f7a85625a 100644 --- a/Firebird.4.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Firebird.4.LinqService).sql @@ -1,103 +1,11 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicParent"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicParent')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DynamicParent" - ( - ID Int NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY (ID) - ) - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT ' - CREATE GENERATOR "GIDENTITY_DynamicParent" - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT ' - CREATE TRIGGER "TIDENTITY_DynamicParent" FOR "DynamicParent" - BEFORE INSERT POSITION 0 - AS BEGIN - NEW.ID = GEN_ID("GIDENTITY_DynamicParent", 1); - END - '; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicChild"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicChild')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DynamicChild" - ( - ID Int NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY (ID) - ) - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT ' - CREATE GENERATOR "GIDENTITY_DynamicChild" - '; - IF (NOT EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT ' - CREATE TRIGGER "TIDENTITY_DynamicChild" FOR "DynamicChild" - BEFORE INSERT POSITION 0 - AS BEGIN - NEW.ID = GEN_ID("GIDENTITY_DynamicChild", 1); - END - '; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicChild')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicChild"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicChild')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicChild"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_DynamicParent')) THEN - EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_DynamicParent"'; - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DynamicParent')) THEN - EXECUTE STATEMENT 'DROP TABLE "DynamicParent"'; -END +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "it".ID +FROM + "DynamicParent" "it" + LEFT JOIN "DynamicChild" "a_Child" ON "it".ID = "a_Child"."ParentID" +WHERE + "a_Child".ID = 123 diff --git a/Firebird.4.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.4.LinqService).sql index 3a6c8ab1671a..c22ffa2d6963 100644 --- a/Firebird.4.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Firebird.4.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT + "x"."ParentID" + FROM + "Parent" "x" + WHERE + "x"."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) "m_1" + INNER JOIN "Child" "d" ON "m_1"."ParentID" = "d"."ParentID" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- Firebird.4 Firebird4 (asynchronously) diff --git a/Firebird.4.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.4.LinqService).sql index 62dc72d96ae5..5a9be69957c9 100644 --- a/Firebird.4.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Firebird.4.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT + "x"."ParentID" + FROM + "Parent" "x" + WHERE + "x"."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) "m_1" + INNER JOIN "Child" "d" ON "m_1"."ParentID" = "d"."ParentID" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransaction BeforeExecute -- Firebird.4 Firebird4 (asynchronously) diff --git a/Firebird.4.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..143c799dd4d0 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Firebird.4.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" "a_Children" + INNER JOIN "GrandChild" "a_GrandChildren" ON "a_Children"."ParentID" = "a_GrandChildren"."ParentID" AND "a_Children"."ChildID" = "a_GrandChildren"."ChildID" + WHERE + "p"."ParentID" = "a_Children"."ParentID" + ) +FROM + "Parent" "p" + diff --git a/Firebird.4.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..f15b6f3bd0da --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Firebird.4.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" +WHERE + "t1"."Value1" = 1 + diff --git a/Firebird.4.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..a04870c9a241 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Firebird.4.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT DISTINCT + "p1"."PersonID", + "p1"."Gender", + "p1"."FirstName", + "p1"."LastName" +FROM + "Person" "p1" +WHERE + "p1"."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + "p1"."Gender" = 'F' + diff --git a/Firebird.4.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..aad36fe56226 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Firebird.4.LinqService).sql @@ -0,0 +1,7 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + 1 +FROM rdb$database + diff --git a/Firebird.4.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..ae2767fc6a10 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Firebird.4.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "x"."MiddleName", + COUNT(*) +FROM + "Person" "x" +WHERE + "x"."MiddleName" IS NOT NULL +GROUP BY + "x"."MiddleName" +UNION ALL +SELECT + "x_1"."MiddleName", + COUNT(*) +FROM + "Person" "x_1" +WHERE + "x_1"."MiddleName" IS NOT NULL +GROUP BY + "x_1"."MiddleName" +UNION ALL +SELECT + "x_2"."MiddleName", + COUNT(*) +FROM + "Person" "x_2" +WHERE + "x_2"."MiddleName" IS NOT NULL +GROUP BY + "x_2"."MiddleName" +UNION ALL +SELECT + "x_3"."MiddleName", + COUNT(*) +FROM + "Person" "x_3" +WHERE + "x_3"."MiddleName" IS NOT NULL +GROUP BY + "x_3"."MiddleName" +UNION ALL +SELECT + "x_4"."MiddleName", + COUNT(*) +FROM + "Person" "x_4" +WHERE + "x_4"."MiddleName" IS NOT NULL +GROUP BY + "x_4"."MiddleName" +UNION ALL +SELECT + "x_5"."MiddleName", + COUNT(*) +FROM + "Person" "x_5" +WHERE + "x_5"."MiddleName" IS NOT NULL +GROUP BY + "x_5"."MiddleName" +UNION ALL +SELECT + "x_6"."MiddleName", + COUNT(*) +FROM + "Person" "x_6" +WHERE + "x_6"."MiddleName" IS NOT NULL +GROUP BY + "x_6"."MiddleName" +UNION ALL +SELECT + "x_7"."MiddleName", + COUNT(*) +FROM + "Person" "x_7" +WHERE + "x_7"."MiddleName" IS NOT NULL +GROUP BY + "x_7"."MiddleName" +UNION ALL +SELECT + "x_8"."MiddleName", + COUNT(*) +FROM + "Person" "x_8" +WHERE + "x_8"."MiddleName" IS NOT NULL +GROUP BY + "x_8"."MiddleName" +UNION ALL +SELECT + "x_9"."MiddleName", + COUNT(*) +FROM + "Person" "x_9" +WHERE + "x_9"."MiddleName" IS NOT NULL +GROUP BY + "x_9"."MiddleName" +UNION ALL +SELECT + "x_10"."MiddleName", + COUNT(*) +FROM + "Person" "x_10" +WHERE + "x_10"."MiddleName" IS NOT NULL +GROUP BY + "x_10"."MiddleName" +UNION ALL +SELECT + "x_11"."MiddleName", + COUNT(*) +FROM + "Person" "x_11" +WHERE + "x_11"."MiddleName" IS NOT NULL +GROUP BY + "x_11"."MiddleName" +UNION ALL +SELECT + "x_12"."MiddleName", + COUNT(*) +FROM + "Person" "x_12" +WHERE + "x_12"."MiddleName" IS NOT NULL +GROUP BY + "x_12"."MiddleName" +UNION ALL +SELECT + "x_13"."MiddleName", + COUNT(*) +FROM + "Person" "x_13" +WHERE + "x_13"."MiddleName" IS NOT NULL +GROUP BY + "x_13"."MiddleName" +UNION ALL +SELECT + "x_14"."MiddleName", + COUNT(*) +FROM + "Person" "x_14" +WHERE + "x_14"."MiddleName" IS NOT NULL +GROUP BY + "x_14"."MiddleName" +UNION ALL +SELECT + "x_15"."MiddleName", + COUNT(*) +FROM + "Person" "x_15" +WHERE + "x_15"."MiddleName" IS NOT NULL +GROUP BY + "x_15"."MiddleName" +UNION ALL +SELECT + "x_16"."MiddleName", + COUNT(*) +FROM + "Person" "x_16" +WHERE + "x_16"."MiddleName" IS NOT NULL +GROUP BY + "x_16"."MiddleName" +UNION ALL +SELECT + "x_17"."MiddleName", + COUNT(*) +FROM + "Person" "x_17" +WHERE + "x_17"."MiddleName" IS NOT NULL +GROUP BY + "x_17"."MiddleName" +UNION ALL +SELECT + "x_18"."MiddleName", + COUNT(*) +FROM + "Person" "x_18" +WHERE + "x_18"."MiddleName" IS NOT NULL +GROUP BY + "x_18"."MiddleName" +UNION ALL +SELECT + "x_19"."MiddleName", + COUNT(*) +FROM + "Person" "x_19" +WHERE + "x_19"."MiddleName" IS NOT NULL +GROUP BY + "x_19"."MiddleName" +UNION ALL +SELECT + "x_20"."MiddleName", + COUNT(*) +FROM + "Person" "x_20" +WHERE + "x_20"."MiddleName" IS NOT NULL +GROUP BY + "x_20"."MiddleName" + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.4.LinqService,False).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.4.LinqService,False).sql new file mode 100644 index 000000000000..537d5b1a6d6a --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.4.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.4.LinqService,True).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.4.LinqService,True).sql new file mode 100644 index 000000000000..537d5b1a6d6a --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Firebird.4.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.4.LinqService,False).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.4.LinqService,False).sql new file mode 100644 index 000000000000..537d5b1a6d6a --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.4.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.4.LinqService,True).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.4.LinqService,True).sql new file mode 100644 index 000000000000..537d5b1a6d6a --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Firebird.4.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.4.LinqService).sql index 772f31f96c64..3bf4843a4661 100644 --- a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Firebird.4.LinqService).sql @@ -1,85 +1,13 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TakeSkipClass')) THEN - EXECUTE STATEMENT 'DROP TABLE "TakeSkipClass"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TakeSkipClass')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TakeSkipClass" - ( - "Value" VarChar(10) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Value VarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Value VarChar(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Value VarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Value VarChar(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TakeSkipClass')) THEN - EXECUTE STATEMENT 'DROP TABLE "TakeSkipClass"'; -END +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @skip Integer -- Int32 +SET @skip = 3 + +SELECT + "t1"."Value" +FROM + "TakeSkipClass" "t1" +ORDER BY + "t1"."Value" +OFFSET @skip ROWS diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.4.LinqService,False).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.4.LinqService,False).sql index e3da99ddbdf7..3b44d606b439 100644 --- a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.4.LinqService,False).sql +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.4.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" "ch" FETCH NEXT 3 ROWS ONLY +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT 3 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.4.LinqService,True).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.4.LinqService,True).sql index b07be79ebff6..0da2edd5c3ff 100644 --- a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.4.LinqService,True).sql +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Firebird.4.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" "ch" FETCH NEXT @take ROWS ONLY +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT @take ROWS ONLY + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.4.LinqService,False).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.4.LinqService,False).sql new file mode 100644 index 000000000000..981a30b1b4dd --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.4.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT @n ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.4.LinqService,True).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.4.LinqService,True).sql new file mode 100644 index 000000000000..981a30b1b4dd --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Firebird.4.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT @n ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.4.LinqService,False).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.4.LinqService,False).sql new file mode 100644 index 000000000000..83bb6668273c --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.4.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" > 3 OR "ch"."ChildID" < 4 +FETCH NEXT 3 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.4.LinqService,True).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.4.LinqService,True).sql new file mode 100644 index 000000000000..46014d863b8f --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Firebird.4.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" > 3 OR "ch"."ChildID" < 4 +FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.4.LinqService,False).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.4.LinqService,False).sql new file mode 100644 index 000000000000..8648a1661fba --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.4.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" >= 0 AND "ch"."ChildID" <= 100 +FETCH NEXT 3 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.4.LinqService,True).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.4.LinqService,True).sql new file mode 100644 index 000000000000..f3426a4518a1 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Firebird.4.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" >= 0 AND "ch"."ChildID" <= 100 +FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.4.LinqService,False).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.4.LinqService,False).sql new file mode 100644 index 000000000000..88e83ba3c441 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.4.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT 3 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.4.LinqService,True).sql b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.4.LinqService,True).sql new file mode 100644 index 000000000000..88423bf7bf87 --- /dev/null +++ b/Firebird.4.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Firebird.4.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT @take ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,False,False).sql b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,False,False).sql index ad314984bd54..cb569100f14b 100644 --- a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,False,False).sql +++ b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,False,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,False,True).sql b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,False,True).sql index ad314984bd54..cb569100f14b 100644 --- a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,False,True).sql +++ b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,False,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,True,False).sql b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,True,False).sql index ad314984bd54..cb569100f14b 100644 --- a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,True,False).sql +++ b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,True,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,True,True).sql b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,True,True).sql index ad314984bd54..cb569100f14b 100644 --- a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,True,True).sql +++ b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,False,True,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,False,False).sql b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,False,False).sql index ad314984bd54..cb569100f14b 100644 --- a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,False,False).sql +++ b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,False,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,False,True).sql b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,False,True).sql index ad314984bd54..cb569100f14b 100644 --- a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,False,True).sql +++ b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,False,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,True,False).sql b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,True,False).sql index ad314984bd54..cb569100f14b 100644 --- a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,True,False).sql +++ b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,True,False).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,True,True).sql b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,True,True).sql index ad314984bd54..cb569100f14b 100644 --- a/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,True,True).sql +++ b/Firebird.4.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Firebird.4.LinqService,True,True,True).sql @@ -6,3 +6,22 @@ EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'Issue681Table2')) THEN + EXECUTE STATEMENT 'DROP TABLE "Issue681Table2"'; +END + diff --git a/Firebird.4.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..82ef66498843 --- /dev/null +++ b/Firebird.4.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Firebird.4.LinqService).sql @@ -0,0 +1,59 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_TestTable')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_TestTable"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_TestTable')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_TestTable"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TestTable')) THEN + EXECUTE STATEMENT 'DROP TABLE "TestTable"'; +END + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "TestTable" + ( + ID Int NOT NULL, + "Field1" VarChar(50) CHARACTER SET UNICODE_FSS, + "Field2" VarChar(255) CHARACTER SET UNICODE_FSS, + "CreatedOn" TimeStamp, + + CONSTRAINT "PK_TestTable" PRIMARY KEY (ID) + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_TestTable" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_TestTable" FOR "TestTable" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW.ID = GEN_ID("GIDENTITY_TestTable", 1); + END + '; +END + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1".ID, + "t1"."Field1", + "t1"."Field2", + "t1"."CreatedOn" +FROM + "TestTable" "t1" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_TestTable"'; + EXECUTE STATEMENT 'DROP TABLE "TestTable"'; +END + diff --git a/Firebird.4.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.4.LinqService).sql index 9374c61f4cc7..3fb21d36b9bb 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Firebird.4.LinqService).sql @@ -1,4 +1,37 @@ BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TempTable')) THEN + EXECUTE STATEMENT 'DROP TABLE "TempTable"'; +END + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TempTable')) THEN + EXECUTE STATEMENT ' + CREATE TABLE "TempTable" + ( + ID Int NOT NULL + ) + '; +END + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +INSERT INTO "TempTable" +( + ID +) +SELECT + "p"."ParentID" +FROM + "Parent" "p" + +BeforeExecute -- Firebird.4 Firebird4 SELECT @@ -7,3 +40,11 @@ FROM "Parent" "p" INNER JOIN "TempTable" "t" ON "p"."ParentID" = "t".ID +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TempTable')) THEN + EXECUTE STATEMENT 'DROP TABLE "TempTable"'; +END + diff --git a/Firebird.4.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..fab7fad0d1e3 --- /dev/null +++ b/Firebird.4.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Firebird.4.LinqService).sql @@ -0,0 +1,114 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_xxPerson_fl_30')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_30"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_xxPerson_fl_30')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_30"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPerson_fl_30')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_30"'; +END + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "xxPerson_fl_30" + ( + "FirstName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "MiddleName" VarChar(255) CHARACTER SET UNICODE_FSS, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_fl_30" PRIMARY KEY ("PersonID") + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_xxPerson_fl_30" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_xxPerson_fl_30" FOR "xxPerson_fl_30" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW."PersonID" = GEN_ID("GIDENTITY_xxPerson_fl_30", 1); + END + '; +END + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson_fl_30" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_30" "t1" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson_fl_30" "t1" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson_fl_30" "t1" +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_30" "t1" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_30"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_30"'; + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_30"'; +END + diff --git a/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.4.LinqService,100).sql b/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.4.LinqService,100).sql index 9d65bce82c84..b37b070ea1f0 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.4.LinqService,100).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.4.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id", + "s"."Value", + "s"."ValueStr" + diff --git a/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.4.LinqService,200).sql b/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.4.LinqService,200).sql index 9d65bce82c84..b37b070ea1f0 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.4.LinqService,200).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(Firebird.4.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id", + "s"."Value", + "s"."ValueStr" + diff --git a/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,100).sql b/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,100).sql index 9d65bce82c84..4c1e32f022b6 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,100).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,200).sql b/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,200).sql index 9d65bce82c84..917e9ad0b429 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,200).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,100).sql b/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,100).sql index 9d65bce82c84..41c84d7ccb96 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,100).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id" + 1, + "s"."ValueStr" || CAST(1 AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,200).sql b/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,200).sql index 9d65bce82c84..41c84d7ccb96 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,200).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(Firebird.4.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE "s"."Id" = 3 +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +DELETE FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "s"."Id" + 1, + "s"."ValueStr" || CAST(1 AS VarChar(11) CHARACTER SET UNICODE_FSS) + diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..44e96ef975b0 --- /dev/null +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Firebird.4.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..fa97c831a29f --- /dev/null +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Firebird.4.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + "c_1"."ParentID", + CAST(@id AS Int) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = 11 + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..fa97c831a29f --- /dev/null +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Firebird.4.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + "c_1"."ParentID", + CAST(@id AS Int) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = 11 + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.4.LinqService).sql index 8c7fe66a420f..cc08cf02865e 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Firebird.4.LinqService).sql @@ -1,5 +1,59 @@ BeforeExecute -- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "xxPerson_fl_31" + ( + "FirstName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "MiddleName" VarChar(255) CHARACTER SET UNICODE_FSS, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_fl_31" PRIMARY KEY ("PersonID") + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_xxPerson_fl_31" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_xxPerson_fl_31" FOR "xxPerson_fl_31" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW."PersonID" = GEN_ID("GIDENTITY_xxPerson_fl_31", 1); + END + '; +END + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson_fl_31" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) DECLARE @FirstName VarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName VarChar(4) -- String @@ -58,3 +112,43 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_31" "t1" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_31" "p" +WHERE + "p"."FirstName" = 'Steven' AND "p"."LastName" = 'King' AND + "p"."Gender" = 'M' + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_31"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_31"'; + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_31"'; +END + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_xxPerson_fl_31')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_31"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_xxPerson_fl_31')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_31"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPerson_fl_31')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_31"'; +END + diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.4.LinqService).sql index e1985f6e9689..b6d03aab97ff 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Firebird.4.LinqService).sql @@ -33,3 +33,101 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc0' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc1' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc2' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id +FETCH NEXT 2 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..a5d69424ea88 --- /dev/null +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Firebird.4.LinqService).sql @@ -0,0 +1,155 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPatient21')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPatient21"'; +END + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +CREATE TABLE "xxPatient21" +( + "PersonID" Int NOT NULL, + "Diagnosis" VarChar(255) CHARACTER SET UNICODE_FSS, + + CONSTRAINT "PK_xxPatient21" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient21" "t1" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient21" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS VARCHAR(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS VARCHAR(4)) + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient21" "t1" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPatient21')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPatient21"'; +END + diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.4.LinqService).sql index e1985f6e9689..580b57e89fae 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Firebird.4.LinqService).sql @@ -33,3 +33,101 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id +FETCH NEXT 2 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.4.LinqService).sql index e1985f6e9689..ec0357a12eca 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Firebird.4.LinqService).sql @@ -33,3 +33,107 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 +DECLARE @id Integer -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 +DECLARE @id Integer -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 +DECLARE @id Integer -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM rdb$database) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = Char_Length("t1"."Diagnosis") + CAST(@i AS Int) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id +FETCH NEXT 2 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.4.LinqService).sql index 159e3ec38c0f..9a874fac50d1 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Firebird.4.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = 'John' AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Firebird.4 Firebird4 diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.4.LinqService).sql index 159e3ec38c0f..9a874fac50d1 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Firebird.4.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = 'John' AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Firebird.4 Firebird4 diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.4.LinqService).sql index 5dd5f88a2162..69a89d071d6e 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Firebird.4.LinqService).sql @@ -36,6 +36,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John0' + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = @p AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Firebird.4 Firebird4 (asynchronously) DECLARE @FirstName VarChar(5) -- String @@ -66,6 +83,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John1' + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = @p AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Firebird.4 Firebird4 diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.4.LinqService,1).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.4.LinqService,1).sql index 4b1335ba04fc..7ea69de84afa 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.4.LinqService,1).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.4.LinqService,1).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.4 Firebird4 +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.4.LinqService,2).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.4.LinqService,2).sql index 4b1335ba04fc..0f525ac1a54d 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.4.LinqService,2).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(Firebird.4.LinqService,2).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.4 Firebird4 +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,1).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,1).sql index 4b1335ba04fc..657e6a36f89e 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,1).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,1).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.4 Firebird4 +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,2).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,2).sql index 4b1335ba04fc..7b2acd76203d 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,2).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,2).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.4 Firebird4 +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.4.LinqService,100).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.4.LinqService,100).sql index 83591e62bfd2..de7081a6cf28 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.4.LinqService,100).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.4.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) +FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- Firebird.4 Firebird4 DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.4.LinqService,200).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.4.LinqService,200).sql index d321713c2007..7db6fa02ebda 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.4.LinqService,200).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(Firebird.4.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + "s"."Id" + CAST(@param AS Int), + "s"."Value" + CAST(@param AS Int), + "s"."ValueStr" || CAST(@param AS VarChar(11) CHARACTER SET UNICODE_FSS) +FROM + "TableWithData" "s" +WHERE + "s"."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- Firebird.4 Firebird4 DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.4.LinqService,1).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.4.LinqService,1).sql index 4b1335ba04fc..743b20a114b3 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.4.LinqService,1).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.4.LinqService,1).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.4 Firebird4 +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Id", + "Value", + "ValueStr" +) +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.4.LinqService,2).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.4.LinqService,2).sql index 4b1335ba04fc..7f40306a7535 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.4.LinqService,2).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(Firebird.4.LinqService,2).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.4 Firebird4 +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Id", + "Value", + "ValueStr" +) +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,1).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,1).sql index 4b1335ba04fc..657e6a36f89e 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,1).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,1).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.4 Firebird4 +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,2).sql b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,2).sql index 4b1335ba04fc..7b2acd76203d 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,2).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(Firebird.4.LinqService,2).sql @@ -1,31 +1,26 @@ BeforeExecute --- Firebird.4 Firebird4 +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +INSERT INTO "TableWithData" +( + "Value", + "Id", + "ValueStr" +) +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/Firebird.4.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(Firebird.4.LinqService).sql index 64a3a70e67a2..c397325c8ed1 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(Firebird.4.LinqService).sql @@ -218,3 +218,55 @@ VALUES @Field4 ) +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" + WHERE + "t1"."Id" = 5 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) +RETURNING + OLD."Id", + OLD."Field1", + OLD."Field2", + OLD."Field3", + OLD."Field4", + OLD."Field5", + NEW."Id", + NEW."Field1", + NEW."Field2", + NEW."Field3", + NEW."Field4", + NEW."Field5" + diff --git a/Firebird.4.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.4.LinqService).sql index da9b4253aed7..dd4bc29077f6 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Firebird.4.LinqService).sql @@ -218,6 +218,45 @@ VALUES @Field4 ) +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" + WHERE + "t1"."Id" = 5 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Firebird.4 Firebird4 diff --git a/Firebird.4.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.4.LinqService).sql index da9b4253aed7..7eaa2257ee04 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Firebird.4.LinqService).sql @@ -218,6 +218,43 @@ VALUES @Field4 ) +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Firebird.4 Firebird4 diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..66c5d97f49c9 --- /dev/null +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Firebird.4.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = ( + SELECT + "p2_1"."ParentID" + FROM + "Parent" "p1_1" + INNER JOIN "Parent" "p2_1" ON "p1_1"."ParentID" = "p2_1"."ParentID" + WHERE + "p1_1"."ParentID" < 3 AND "Parent"."ParentID" = "p1_1"."ParentID" AND + ("Parent"."Value1" = "p1_1"."Value1" OR "Parent"."Value1" IS NULL AND "p1_1"."Value1" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "Parent" "p1" + INNER JOIN "Parent" "p2" ON "p1"."ParentID" = "p2"."ParentID" + WHERE + "p1"."ParentID" < 3 AND "Parent"."ParentID" = "p1"."ParentID" AND + ("Parent"."Value1" = "p1"."Value1" OR "Parent"."Value1" IS NULL AND "p1"."Value1" IS NULL) + ) + diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..e97e6bb50027 --- /dev/null +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Firebird.4.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" "p" +SET + "ParentID" = "p"."ParentID" + 1 +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @p + diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..e97e6bb50027 --- /dev/null +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Firebird.4.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" "p" +SET + "ParentID" = "p"."ParentID" + 1 +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @p + diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..78469ab132eb --- /dev/null +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Firebird.4.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "c_1" + LEFT JOIN "Parent" "a_Parent" ON "c_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "c_1"."ChildID" = @id AND + "a_Parent"."Value1" = 1 AND + "Child"."ParentID" = "c_1"."ParentID" AND + "Child"."ChildID" = "c_1"."ChildID" + ) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @p + diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..90dca325d8d9 --- /dev/null +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Firebird.4.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "child_1" + LEFT JOIN "Parent" "a_Parent" ON "child_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "child_1"."ChildID" = 10000 AND "Parent"."ParentID" = "a_Parent"."ParentID" AND + ("Parent"."Value1" = "a_Parent"."Value1" OR "Parent"."Value1" IS NULL AND "a_Parent"."Value1" IS NULL) + ) + diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..90dca325d8d9 --- /dev/null +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Firebird.4.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "child_1" + LEFT JOIN "Parent" "a_Parent" ON "child_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "child_1"."ChildID" = 10000 AND "Parent"."ParentID" = "a_Parent"."ParentID" AND + ("Parent"."Value1" = "a_Parent"."Value1" OR "Parent"."Value1" IS NULL AND "a_Parent"."Value1" IS NULL) + ) + diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.4.LinqService).sql new file mode 100644 index 000000000000..45d7032f7d7b --- /dev/null +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Firebird.4.LinqService).sql @@ -0,0 +1,132 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + IF (EXISTS(SELECT 1 FROM rdb$triggers WHERE rdb$trigger_name = 'TIDENTITY_xxPerson_fl_33')) THEN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_33"'; + IF (EXISTS(SELECT 1 FROM rdb$generators WHERE rdb$generator_name = 'GIDENTITY_xxPerson_fl_33')) THEN + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_33"'; + IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'xxPerson_fl_33')) THEN + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_33"'; +END + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT ' + CREATE TABLE "xxPerson_fl_33" + ( + "FirstName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) CHARACTER SET UNICODE_FSS NOT NULL, + "MiddleName" VarChar(255) CHARACTER SET UNICODE_FSS, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_fl_33" PRIMARY KEY ("PersonID") + ) + '; + EXECUTE STATEMENT ' + CREATE GENERATOR "GIDENTITY_xxPerson_fl_33" + '; + EXECUTE STATEMENT ' + CREATE TRIGGER "TIDENTITY_xxPerson_fl_33" FOR "xxPerson_fl_33" + BEFORE INSERT POSITION 0 + AS BEGIN + NEW."PersonID" = GEN_ID("GIDENTITY_xxPerson_fl_33", 1); + END + '; +END + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson_fl_33" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_fl_33" "t1" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson_fl_33" "t1" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +UPDATE + "xxPerson_fl_33" "t1" +SET + "FirstName" = CAST(@FirstName AS VARCHAR(6)), + "LastName" = CAST(@LastName AS VARCHAR(4)), + "MiddleName" = CAST(@MiddleName AS VARCHAR(4)), + "Gender" = CAST(@Gender AS Char(1)) +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson_fl_33" "t1" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +EXECUTE BLOCK AS BEGIN + EXECUTE STATEMENT 'DROP TRIGGER "TIDENTITY_xxPerson_fl_33"'; + EXECUTE STATEMENT 'DROP GENERATOR "GIDENTITY_xxPerson_fl_33"'; + EXECUTE STATEMENT 'DROP TABLE "xxPerson_fl_33"'; +END + diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.4.LinqService).sql index 3b23a3f1809c..e3004809464c 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Firebird.4.LinqService).sql @@ -35,3 +35,60 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 6 + +SELECT + "t1"."PersonID", + "t1"."Gender", + "t1"."FirstName", + "t1"."MiddleName", + "t1"."LastName" +FROM + "Person" "t1" +WHERE + "t1"."PersonID" = @id +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName VarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName VarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName VarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer -- Int32 +SET @ID = 6 + +UPDATE + "Person" "t1" +SET + "Gender" = CAST(@Gender AS CHAR(1)), + "FirstName" = CAST(@Name_FirstName AS VARCHAR(13)), + "MiddleName" = CAST(@Name_MiddleName AS VARCHAR(1)), + "LastName" = CAST(@Name_LastName AS VARCHAR(13)) +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 6 + +SELECT + "t1"."PersonID", + "t1"."Gender", + "t1"."FirstName", + "t1"."MiddleName", + "t1"."LastName" +FROM + "Person" "t1" +WHERE + "t1"."PersonID" = @id +FETCH NEXT 1 ROWS ONLY + diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql index 1480ee285f04..f52b6ea37458 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql @@ -1,458 +1,63 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.4.LinqService).sql index 1480ee285f04..af851f3f0303 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.4.LinqService).sql @@ -1,458 +1,59 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.4.LinqService).sql index 1480ee285f04..a758fa16b7fb 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.4.LinqService).sql @@ -1,458 +1,58 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + NEW."Value" diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql index 1480ee285f04..f52b6ea37458 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql @@ -1,458 +1,63 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.4.LinqService).sql index 1480ee285f04..af851f3f0303 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(Firebird.4.LinqService).sql @@ -1,458 +1,59 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.4.LinqService).sql index 1480ee285f04..a758fa16b7fb 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(Firebird.4.LinqService).sql @@ -1,458 +1,58 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "DestinationTable" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'DestinationTable')) THEN - EXECUTE STATEMENT 'DROP TABLE "DestinationTable"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = ( + SELECT + "t2"."Id" + FROM + "TableWithData" "t2" + INNER JOIN "DestinationTable" "t_1" ON "t_1"."Id" = "t2"."Id" + WHERE + "t2"."Id" = 3 AND + "DestinationTable"."Id" = "t_1"."Id" AND + "DestinationTable"."Value" = "t_1"."Value" AND + ("DestinationTable"."ValueStr" = "t_1"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_1"."ValueStr" IS NULL) + ), + "Value" = ( + SELECT + "t3"."Value" + FROM + "TableWithData" "t3" + INNER JOIN "DestinationTable" "t_2" ON "t_2"."Id" = "t3"."Id" + WHERE + "t3"."Id" = 3 AND + "DestinationTable"."Id" = "t_2"."Id" AND + "DestinationTable"."Value" = "t_2"."Value" AND + ("DestinationTable"."ValueStr" = "t_2"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_2"."ValueStr" IS NULL) + ), + "ValueStr" = ( + SELECT + "t4"."ValueStr" + FROM + "TableWithData" "t4" + INNER JOIN "DestinationTable" "t_3" ON "t_3"."Id" = "t4"."Id" + WHERE + "t4"."Id" = 3 AND + "DestinationTable"."Id" = "t_3"."Id" AND + "DestinationTable"."Value" = "t_3"."Value" AND + ("DestinationTable"."ValueStr" = "t_3"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t_3"."ValueStr" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "TableWithData" "t1" + INNER JOIN "DestinationTable" "t" ON "t"."Id" = "t1"."Id" + WHERE + "t1"."Id" = 3 AND + "DestinationTable"."Id" = "t"."Id" AND + "DestinationTable"."Value" = "t"."Value" AND + ("DestinationTable"."ValueStr" = "t"."ValueStr" OR "DestinationTable"."ValueStr" IS NULL AND "t"."ValueStr" IS NULL) + ) +RETURNING + NEW."Value" diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql index afaf73989041..0ce3a2c4935e 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql @@ -1,229 +1,18 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql index afaf73989041..19ef82a4f01f 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql @@ -1,229 +1,14 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.4.LinqService).sql index afaf73989041..240bf99f1741 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.4.LinqService).sql @@ -1,229 +1,13 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + NEW."Value" diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql index afaf73989041..ec6df0bbed36 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql @@ -1,229 +1,19 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Id" = "s"."Id", + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + OLD."Id", + OLD."Value", + OLD."ValueStr", + NEW."Id", + NEW."Value", + NEW."ValueStr" diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql index afaf73989041..d26d6de716ca 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(Firebird.4.LinqService).sql @@ -1,229 +1,15 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Id" = "s"."Id", + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + OLD."Value", + NEW."Value" diff --git a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.4.LinqService).sql b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.4.LinqService).sql index afaf73989041..fec9631c09d5 100644 --- a/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.4.LinqService).sql +++ b/Firebird.4.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(Firebird.4.LinqService).sql @@ -1,229 +1,14 @@ BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (NOT EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT ' - CREATE TABLE "TableWithData" - ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" VarChar(50) CHARACTER SET UNICODE_FSS - ) - '; -END - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr VarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- Firebird.4 Firebird4 - -EXECUTE BLOCK AS BEGIN - IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'TableWithData')) THEN - EXECUTE STATEMENT 'DROP TABLE "TableWithData"'; -END +-- Firebird.4 Firebird4 (asynchronously) + +UPDATE + "TableWithData" "s" +SET + "Id" = "s"."Id", + "Value" = "s"."Value" + 1, + "ValueStr" = "s"."ValueStr" || 'Upd' +WHERE + "s"."Id" = 3 +RETURNING + NEW."Value" diff --git a/Firebird.4/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.4).sql b/Firebird.4/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.4).sql new file mode 100644 index 000000000000..2534d65b5736 --- /dev/null +++ b/Firebird.4/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Firebird.4).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.4/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.4).sql b/Firebird.4/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.4).sql new file mode 100644 index 000000000000..27494d707400 --- /dev/null +++ b/Firebird.4/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Firebird.4).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/Firebird.4/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.4).sql b/Firebird.4/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.4).sql new file mode 100644 index 000000000000..27494d707400 --- /dev/null +++ b/Firebird.4/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Firebird.4).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Firebird.4 Firebird4 (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + From 00aaf844509b25bd7f70e48778e076e477b62250 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:44:27 +0000 Subject: [PATCH 13/40] [Windows / SQL Server 2017] baselines --- ....All4Async(SqlServer.2017.LinqService).sql | 13 + ...upBy2Async(SqlServer.2017.LinqService).sql | 30 ++ ...rable1Test(SqlServer.2017.LinqService).sql | 9 + ...rable2Test(SqlServer.2017.LinqService).sql | 11 + ...eCast1Test(SqlServer.2017.LinqService).sql | 9 + ...eCast2Test(SqlServer.2017.LinqService).sql | 11 + ...sAsyncTest(SqlServer.2017.LinqService).sql | 13 + ...tAsyncTest(SqlServer.2017.LinqService).sql | 14 + ...keSkipTest(SqlServer.2017.LinqService).sql | 16 + ...tOrDefault(SqlServer.2017.LinqService).sql | 19 + ...pAsyncTest(SqlServer.2017.LinqService).sql | 21 + ...tAsyncTest(SqlServer.2017.LinqService).sql | 21 + ...yTestAsync(SqlServer.2017.LinqService).sql | 30 ++ ...TestAsync2(SqlServer.2017.LinqService).sql | 30 ++ ...AsyncdTest(SqlServer.2017.LinqService).sql | 15 + ...Test3Async(SqlServer.2017.LinqService).sql | 26 + ...sTestAsync(SqlServer.2017.LinqService).sql | 26 + ...tTestAsync(SqlServer.2017.LinqService).sql | 24 + ...TestAsync2(SqlServer.2017.LinqService).sql | 24 + ...TestAsync1(SqlServer.2017.LinqService).sql | 26 + ...TestAsync2(SqlServer.2017.LinqService).sql | 26 + ...xTestAsync(SqlServer.2017.LinqService).sql | 24 + ...TestAsync2(SqlServer.2017.LinqService).sql | 24 + ...icateAsync(SqlServer.2017.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2017.LinqService).sql | 169 +------ ...icateAsync(SqlServer.2017.LinqService).sql | 170 +------ ...icateAsync(SqlServer.2017.LinqService).sql | 170 +------ ...icateAsync(SqlServer.2017.LinqService).sql | 169 +------ ...ectorAsync(SqlServer.2017.LinqService).sql | 169 +------ ...ectorAsync(SqlServer.2017.LinqService).sql | 169 +------ ...icateAsync(SqlServer.2017.LinqService).sql | 170 +------ ...icateAsync(SqlServer.2017.LinqService).sql | 170 +------ ...ncat1Async(SqlServer.2017.LinqService).sql | 19 + ...ementAsync(SqlServer.2017.LinqService).sql | 99 ++++ ...teredAsync(SqlServer.2017.LinqService).sql | 84 ++++ ...ount1Async(SqlServer.2017.LinqService).sql | 8 + ...ount2Async(SqlServer.2017.LinqService).sql | 10 + ...yMax1Async(SqlServer.2017.LinqService).sql | 17 + ....Issue4602(SqlServer.2017.LinqService).sql | 50 +- ...4057_Async(SqlServer.2017.LinqService).sql | 29 ++ ...ransaction(SqlServer.2017.LinqService).sql | 29 ++ ...ssionAsync(SqlServer.2017.LinqService).sql | 25 + ...Cast1Async(SqlServer.2017.LinqService).sql | 11 + ...est18Async(SqlServer.2017.LinqService).sql | 14 + ...eter1Async(SqlServer.2017.LinqService).sql | 6 + ...ue3132Test(SqlServer.2017.LinqService).sql | 213 ++++++++ ...sync(SqlServer.2017.LinqService,False).sql | 16 + ...Async(SqlServer.2017.LinqService,True).sql | 16 + ...sync(SqlServer.2017.LinqService,False).sql | 16 + ...Async(SqlServer.2017.LinqService,True).sql | 16 + ...Skip1Async(SqlServer.2017.LinqService).sql | 84 +--- ...sync(SqlServer.2017.LinqService,False).sql | 18 + ...Async(SqlServer.2017.LinqService,True).sql | 22 + ...sync(SqlServer.2017.LinqService,False).sql | 11 + ...Async(SqlServer.2017.LinqService,True).sql | 11 + ...sync(SqlServer.2017.LinqService,False).sql | 11 + ...Async(SqlServer.2017.LinqService,True).sql | 13 + ...sync(SqlServer.2017.LinqService,False).sql | 11 + ...Async(SqlServer.2017.LinqService,True).sql | 13 + ...sync(SqlServer.2017.LinqService,False).sql | 9 + ...Async(SqlServer.2017.LinqService,True).sql | 11 + ...er.2017.LinqService,False,False,False).sql | 16 + ...ver.2017.LinqService,False,False,True).sql | 16 + ...ver.2017.LinqService,False,True,False).sql | 16 + ...rver.2017.LinqService,False,True,True).sql | 16 + ...able1Async(SqlServer.2017.LinqService).sql | 34 ++ ...TableAsync(SqlServer.2017.LinqService).sql | 31 ++ ...eNameAsync(SqlServer.2017.LinqService).sql | 89 ++++ ...ncTest(SqlServer.2017.LinqService,100).sql | 18 + ...ncTest(SqlServer.2017.LinqService,200).sql | 18 + ...Record(SqlServer.2017.LinqService,100).sql | 13 + ...Record(SqlServer.2017.LinqService,200).sql | 13 + ...ncTest(SqlServer.2017.LinqService,100).sql | 15 + ...ncTest(SqlServer.2017.LinqService,200).sql | 15 + ...Record(SqlServer.2017.LinqService,100).sql | 15 + ...Record(SqlServer.2017.LinqService,200).sql | 15 + ...ncTest(SqlServer.2017.LinqService,100).sql | 21 + ...ncTest(SqlServer.2017.LinqService,200).sql | 21 + ...ncTest(SqlServer.2017.LinqService,100).sql | 12 + ...ncTest(SqlServer.2017.LinqService,200).sql | 12 + ...Record(SqlServer.2017.LinqService,100).sql | 12 + ...Record(SqlServer.2017.LinqService,200).sql | 12 + ...sert2Async(SqlServer.2017.LinqService).sql | 46 ++ ...sert3Async(SqlServer.2017.LinqService).sql | 48 ++ ...sert4Async(SqlServer.2017.LinqService).sql | 48 ++ ...eNameAsync(SqlServer.2017.LinqService).sql | 69 +++ ...lace1Async(SqlServer.2017.LinqService).sql | 97 ++++ ...eNameAsync(SqlServer.2017.LinqService).sql | 149 ++++++ ...date3Async(SqlServer.2017.LinqService).sql | 97 ++++ ...ate3xAsync(SqlServer.2017.LinqService).sql | 103 ++++ ...tity1Async(SqlServer.2017.LinqService).sql | 14 + ...tity2Async(SqlServer.2017.LinqService).sql | 14 + ...tity4Async(SqlServer.2017.LinqService).sql | 32 ++ ...syncTest(SqlServer.2017.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2017.LinqService,2).sql | 41 +- ...syncTest(SqlServer.2017.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2017.LinqService,2).sql | 41 +- ...tAsync(SqlServer.2017.LinqService,100).sql | 24 + ...tAsync(SqlServer.2017.LinqService,200).sql | 24 + ...Record(SqlServer.2017.LinqService,100).sql | 24 + ...Record(SqlServer.2017.LinqService,200).sql | 24 + ...syncTest(SqlServer.2017.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2017.LinqService,2).sql | 41 +- ...syncTest(SqlServer.2017.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2017.LinqService,2).sql | 41 +- ...tFullAsync(SqlServer.2017.LinqService).sql | 54 +++ ...ctionAsync(SqlServer.2017.LinqService).sql | 53 ++ ...mQueryAsyn(SqlServer.2017.LinqService).sql | 40 ++ ...mTableAsyn(SqlServer.2017.LinqService).sql | 38 ++ ...ate12Async(SqlServer.2017.LinqService).sql | 13 + ...date1Async(SqlServer.2017.LinqService).sql | 54 +++ ...date2Async(SqlServer.2017.LinqService).sql | 54 +++ ...date4Async(SqlServer.2017.LinqService).sql | 55 +++ ...tion1Async(SqlServer.2017.LinqService).sql | 41 ++ ...n1AsyncOld(SqlServer.2017.LinqService).sql | 41 ++ ...eNameAsync(SqlServer.2017.LinqService).sql | 105 ++++ ...plex1Async(SqlServer.2017.LinqService).sql | 55 +++ ...oTestAsync(SqlServer.2017.LinqService).sql | 23 + ...tTestAsync(SqlServer.2017.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2017.LinqService).sql | 456 +----------------- ...oTestAsync(SqlServer.2017.LinqService).sql | 23 + ...tTestAsync(SqlServer.2017.LinqService).sql | 451 +---------------- ...nateUpdate(SqlServer.2017.LinqService).sql | 450 +---------------- ...ngleRecord(SqlServer.2017.LinqService).sql | 452 +---------------- ...WithoutOld(SqlServer.2017.LinqService).sql | 450 +---------------- ...nateUpdate(SqlServer.2017.LinqService).sql | 449 +---------------- ...ngleRecord(SqlServer.2017.LinqService).sql | 451 +---------------- ...oTestAsync(SqlServer.2017.LinqService).sql | 23 + ...tTestAsync(SqlServer.2017.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2017.LinqService).sql | 456 +----------------- ...oTestAsync(SqlServer.2017.LinqService).sql | 23 + ...tTestAsync(SqlServer.2017.LinqService).sql | 451 +---------------- ...nateUpdate(SqlServer.2017.LinqService).sql | 450 +---------------- ...ngleRecord(SqlServer.2017.LinqService).sql | 452 +---------------- ...WithoutOld(SqlServer.2017.LinqService).sql | 450 +---------------- ...nateUpdate(SqlServer.2017.LinqService).sql | 449 +---------------- ...ngleRecord(SqlServer.2017.LinqService).sql | 451 +---------------- ...oTestAsync(SqlServer.2017.LinqService).sql | 21 + ...tTestAsync(SqlServer.2017.LinqService).sql | 233 +-------- ...ngleRecord(SqlServer.2017.LinqService).sql | 233 +-------- ...tTestAsync(SqlServer.2017.LinqService).sql | 229 +-------- ...ngleRecord(SqlServer.2017.LinqService).sql | 229 +-------- ...WithoutOld(SqlServer.2017.LinqService).sql | 228 +-------- ...ngleRecord(SqlServer.2017.LinqService).sql | 228 +-------- ...tIntoAsync(SqlServer.2017.LinqService).sql | 21 + ...oTestAsync(SqlServer.2017.LinqService).sql | 22 + ...tTestAsync(SqlServer.2017.LinqService).sql | 234 +-------- ...ngleRecord(SqlServer.2017.LinqService).sql | 234 +-------- ...tTestAsync(SqlServer.2017.LinqService).sql | 230 +-------- ...ngleRecord(SqlServer.2017.LinqService).sql | 230 +-------- ...WithoutOld(SqlServer.2017.LinqService).sql | 229 +-------- ...ngleRecord(SqlServer.2017.LinqService).sql | 229 +-------- ...tIntoAsync(SqlServer.2017.LinqService).sql | 22 + ...l4Async(SqlServer.2017.MS.LinqService).sql | 13 + ...y2Async(SqlServer.2017.MS.LinqService).sql | 30 ++ ...le1Test(SqlServer.2017.MS.LinqService).sql | 9 + ...le2Test(SqlServer.2017.MS.LinqService).sql | 11 + ...st1Test(SqlServer.2017.MS.LinqService).sql | 9 + ...st2Test(SqlServer.2017.MS.LinqService).sql | 11 + ...yncTest(SqlServer.2017.MS.LinqService).sql | 13 + ...yncTest(SqlServer.2017.MS.LinqService).sql | 14 + ...kipTest(SqlServer.2017.MS.LinqService).sql | 16 + ...Default(SqlServer.2017.MS.LinqService).sql | 19 + ...yncTest(SqlServer.2017.MS.LinqService).sql | 21 + ...yncTest(SqlServer.2017.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2017.MS.LinqService).sql | 30 ++ ...tAsync2(SqlServer.2017.MS.LinqService).sql | 30 ++ ...ncdTest(SqlServer.2017.MS.LinqService).sql | 15 + ...t3Async(SqlServer.2017.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2017.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2017.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2017.MS.LinqService).sql | 24 + ...tAsync1(SqlServer.2017.MS.LinqService).sql | 26 + ...tAsync2(SqlServer.2017.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2017.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2017.MS.LinqService).sql | 24 + ...teAsync(SqlServer.2017.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2017.MS.LinqService).sql | 169 +------ ...teAsync(SqlServer.2017.MS.LinqService).sql | 170 +------ ...teAsync(SqlServer.2017.MS.LinqService).sql | 170 +------ ...teAsync(SqlServer.2017.MS.LinqService).sql | 169 +------ ...orAsync(SqlServer.2017.MS.LinqService).sql | 169 +------ ...orAsync(SqlServer.2017.MS.LinqService).sql | 169 +------ ...teAsync(SqlServer.2017.MS.LinqService).sql | 170 +------ ...teAsync(SqlServer.2017.MS.LinqService).sql | 170 +------ ...t1Async(SqlServer.2017.MS.LinqService).sql | 19 + ...ntAsync(SqlServer.2017.MS.LinqService).sql | 99 ++++ ...edAsync(SqlServer.2017.MS.LinqService).sql | 84 ++++ ...t1Async(SqlServer.2017.MS.LinqService).sql | 8 + ...t2Async(SqlServer.2017.MS.LinqService).sql | 10 + ...x1Async(SqlServer.2017.MS.LinqService).sql | 17 + ...sue4602(SqlServer.2017.MS.LinqService).sql | 50 +- ...7_Async(SqlServer.2017.MS.LinqService).sql | 29 ++ ...saction(SqlServer.2017.MS.LinqService).sql | 29 ++ ...onAsync(SqlServer.2017.MS.LinqService).sql | 25 + ...t1Async(SqlServer.2017.MS.LinqService).sql | 11 + ...18Async(SqlServer.2017.MS.LinqService).sql | 14 + ...r1Async(SqlServer.2017.MS.LinqService).sql | 6 + ...132Test(SqlServer.2017.MS.LinqService).sql | 213 ++++++++ ...c(SqlServer.2017.MS.LinqService,False).sql | 16 + ...nc(SqlServer.2017.MS.LinqService,True).sql | 16 + ...c(SqlServer.2017.MS.LinqService,False).sql | 16 + ...nc(SqlServer.2017.MS.LinqService,True).sql | 16 + ...p1Async(SqlServer.2017.MS.LinqService).sql | 84 +--- ...c(SqlServer.2017.MS.LinqService,False).sql | 18 + ...nc(SqlServer.2017.MS.LinqService,True).sql | 22 + ...c(SqlServer.2017.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2017.MS.LinqService,True).sql | 11 + ...c(SqlServer.2017.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2017.MS.LinqService,True).sql | 13 + ...c(SqlServer.2017.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2017.MS.LinqService,True).sql | 13 + ...c(SqlServer.2017.MS.LinqService,False).sql | 9 + ...nc(SqlServer.2017.MS.LinqService,True).sql | 11 + ...2017.MS.LinqService,False,False,False).sql | 16 + ....2017.MS.LinqService,False,False,True).sql | 16 + ....2017.MS.LinqService,False,True,False).sql | 16 + ...r.2017.MS.LinqService,False,True,True).sql | 16 + ...e1Async(SqlServer.2017.MS.LinqService).sql | 34 ++ ...leAsync(SqlServer.2017.MS.LinqService).sql | 31 ++ ...meAsync(SqlServer.2017.MS.LinqService).sql | 89 ++++ ...est(SqlServer.2017.MS.LinqService,100).sql | 18 + ...est(SqlServer.2017.MS.LinqService,200).sql | 18 + ...ord(SqlServer.2017.MS.LinqService,100).sql | 13 + ...ord(SqlServer.2017.MS.LinqService,200).sql | 13 + ...est(SqlServer.2017.MS.LinqService,100).sql | 15 + ...est(SqlServer.2017.MS.LinqService,200).sql | 15 + ...ord(SqlServer.2017.MS.LinqService,100).sql | 15 + ...ord(SqlServer.2017.MS.LinqService,200).sql | 15 + ...est(SqlServer.2017.MS.LinqService,100).sql | 21 + ...est(SqlServer.2017.MS.LinqService,200).sql | 21 + ...est(SqlServer.2017.MS.LinqService,100).sql | 12 + ...est(SqlServer.2017.MS.LinqService,200).sql | 12 + ...ord(SqlServer.2017.MS.LinqService,100).sql | 12 + ...ord(SqlServer.2017.MS.LinqService,200).sql | 12 + ...t2Async(SqlServer.2017.MS.LinqService).sql | 46 ++ ...t3Async(SqlServer.2017.MS.LinqService).sql | 48 ++ ...t4Async(SqlServer.2017.MS.LinqService).sql | 48 ++ ...meAsync(SqlServer.2017.MS.LinqService).sql | 69 +++ ...e1Async(SqlServer.2017.MS.LinqService).sql | 97 ++++ ...meAsync(SqlServer.2017.MS.LinqService).sql | 149 ++++++ ...e3Async(SqlServer.2017.MS.LinqService).sql | 97 ++++ ...3xAsync(SqlServer.2017.MS.LinqService).sql | 103 ++++ ...y1Async(SqlServer.2017.MS.LinqService).sql | 14 + ...y2Async(SqlServer.2017.MS.LinqService).sql | 14 + ...y4Async(SqlServer.2017.MS.LinqService).sql | 32 ++ ...cTest(SqlServer.2017.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2017.MS.LinqService,2).sql | 41 +- ...cTest(SqlServer.2017.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2017.MS.LinqService,2).sql | 41 +- ...ync(SqlServer.2017.MS.LinqService,100).sql | 24 + ...ync(SqlServer.2017.MS.LinqService,200).sql | 24 + ...ord(SqlServer.2017.MS.LinqService,100).sql | 24 + ...ord(SqlServer.2017.MS.LinqService,200).sql | 24 + ...cTest(SqlServer.2017.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2017.MS.LinqService,2).sql | 41 +- ...cTest(SqlServer.2017.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2017.MS.LinqService,2).sql | 41 +- ...llAsync(SqlServer.2017.MS.LinqService).sql | 54 +++ ...onAsync(SqlServer.2017.MS.LinqService).sql | 53 ++ ...eryAsyn(SqlServer.2017.MS.LinqService).sql | 40 ++ ...bleAsyn(SqlServer.2017.MS.LinqService).sql | 38 ++ ...12Async(SqlServer.2017.MS.LinqService).sql | 13 + ...e1Async(SqlServer.2017.MS.LinqService).sql | 54 +++ ...e2Async(SqlServer.2017.MS.LinqService).sql | 54 +++ ...e4Async(SqlServer.2017.MS.LinqService).sql | 55 +++ ...n1Async(SqlServer.2017.MS.LinqService).sql | 41 ++ ...syncOld(SqlServer.2017.MS.LinqService).sql | 41 ++ ...meAsync(SqlServer.2017.MS.LinqService).sql | 105 ++++ ...x1Async(SqlServer.2017.MS.LinqService).sql | 55 +++ ...stAsync(SqlServer.2017.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2017.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2017.MS.LinqService).sql | 456 +----------------- ...stAsync(SqlServer.2017.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2017.MS.LinqService).sql | 451 +---------------- ...eUpdate(SqlServer.2017.MS.LinqService).sql | 450 +---------------- ...eRecord(SqlServer.2017.MS.LinqService).sql | 452 +---------------- ...houtOld(SqlServer.2017.MS.LinqService).sql | 450 +---------------- ...eUpdate(SqlServer.2017.MS.LinqService).sql | 449 +---------------- ...eRecord(SqlServer.2017.MS.LinqService).sql | 451 +---------------- ...stAsync(SqlServer.2017.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2017.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2017.MS.LinqService).sql | 456 +----------------- ...stAsync(SqlServer.2017.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2017.MS.LinqService).sql | 451 +---------------- ...eUpdate(SqlServer.2017.MS.LinqService).sql | 450 +---------------- ...eRecord(SqlServer.2017.MS.LinqService).sql | 452 +---------------- ...houtOld(SqlServer.2017.MS.LinqService).sql | 450 +---------------- ...eUpdate(SqlServer.2017.MS.LinqService).sql | 449 +---------------- ...eRecord(SqlServer.2017.MS.LinqService).sql | 451 +---------------- ...stAsync(SqlServer.2017.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2017.MS.LinqService).sql | 233 +-------- ...eRecord(SqlServer.2017.MS.LinqService).sql | 233 +-------- ...stAsync(SqlServer.2017.MS.LinqService).sql | 229 +-------- ...eRecord(SqlServer.2017.MS.LinqService).sql | 229 +-------- ...houtOld(SqlServer.2017.MS.LinqService).sql | 228 +-------- ...eRecord(SqlServer.2017.MS.LinqService).sql | 228 +-------- ...toAsync(SqlServer.2017.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2017.MS.LinqService).sql | 22 + ...stAsync(SqlServer.2017.MS.LinqService).sql | 234 +-------- ...eRecord(SqlServer.2017.MS.LinqService).sql | 234 +-------- ...stAsync(SqlServer.2017.MS.LinqService).sql | 230 +-------- ...eRecord(SqlServer.2017.MS.LinqService).sql | 230 +-------- ...houtOld(SqlServer.2017.MS.LinqService).sql | 229 +-------- ...eRecord(SqlServer.2017.MS.LinqService).sql | 229 +-------- ...toAsync(SqlServer.2017.MS.LinqService).sql | 22 + ...inq.AsyncTests.Test(SqlServer.2017.MS).sql | 18 + ...nq.AsyncTests.Test1(SqlServer.2017.MS).sql | 9 + ...ncTests.TestForEach(SqlServer.2017.MS).sql | 9 + ...s.Linq.AsyncTests.Test(SqlServer.2017).sql | 18 + ....Linq.AsyncTests.Test1(SqlServer.2017).sql | 9 + ...AsyncTests.TestForEach(SqlServer.2017).sql | 9 + 312 files changed, 7986 insertions(+), 22538 deletions(-) create mode 100644 SqlServer.2017.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.LinqService,False).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.LinqService,True).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.LinqService,False).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.LinqService,True).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.LinqService,False).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.LinqService,True).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.LinqService,False).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.LinqService,True).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.LinqService,False).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.LinqService,True).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.LinqService,False).sql create mode 100644 SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.LinqService,True).sql create mode 100644 SqlServer.2017.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2017.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.MS.LinqService,False).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.MS.LinqService,True).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.MS.LinqService,False).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.MS.LinqService,True).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.MS.LinqService,False).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.MS.LinqService,True).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.MS.LinqService,False).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.MS.LinqService,True).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.MS.LinqService,False).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.MS.LinqService,True).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.MS.LinqService,False).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.MS.LinqService,True).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2017.MS.LinqService).sql create mode 100644 SqlServer.2017.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2017.MS).sql create mode 100644 SqlServer.2017.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2017.MS).sql create mode 100644 SqlServer.2017.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2017.MS).sql create mode 100644 SqlServer.2017/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2017).sql create mode 100644 SqlServer.2017/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2017).sql create mode 100644 SqlServer.2017/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2017).sql diff --git a/SqlServer.2017.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..e9bb6d6c537c --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.2017.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..dc7805d2f73b --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..14d24131ab01 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2017.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..75981ae1b203 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2017.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..14d24131ab01 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2017.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..75981ae1b203 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2017.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..ac89f3fa034b --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2017.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..0b53f7a5685d --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2017.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2017.LinqService).sql index 3d5d5f61c483..93e9f7892313 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2017.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..b70dc9c5cc68 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2017.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..4a737a6193f9 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2017.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..4a737a6193f9 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2017.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..dd13fec135cb --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2017.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..dd13fec135cb --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2017.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..3853dd2ec186 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2017.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..bdfa6a60219c --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..ad28895ab3c6 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2017.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..e7effa0197b5 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2017.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..e7effa0197b5 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2017.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..aaf6561979c5 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2017.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..aaf6561979c5 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2017.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..f18079eb22e5 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2017.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..f18079eb22e5 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2017.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2017.LinqService).sql index 8bff7f4111da..df933fbc4504 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2017.LinqService).sql @@ -1,161 +1,15 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2017.LinqService).sql index 8bff7f4111da..e0060c3a366b 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2017.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2017.LinqService).sql index 8bff7f4111da..438dee02aafa 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2017.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2017.LinqService).sql index 8bff7f4111da..438dee02aafa 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2017.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2017.LinqService).sql index 8bff7f4111da..e0060c3a366b 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2017.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2017.LinqService).sql index 8bff7f4111da..8690e3ebf79c 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2017.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2017.LinqService).sql index 8bff7f4111da..5960a948116c 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2017.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2017.LinqService).sql index 8bff7f4111da..ce7385904c25 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2017.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2017.LinqService).sql index 8bff7f4111da..ce7385904c25 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2017.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2017.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..ce95c5ceb9a3 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2017.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2017.LinqService).sql index 8da36e9d225b..a4b2562e3ef9 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2017.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2017 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017 diff --git a/SqlServer.2017.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2017.LinqService).sql index 9c22ddd11da8..45eeb5135e80 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2017.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2017 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017 diff --git a/SqlServer.2017.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..355c9ac20308 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..6dcae83f6777 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2017.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..0004984f1f9e --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2017.LinqService).sql index f2de0b388467..7da3fd5d0e3d 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2017.LinqService).sql @@ -1,43 +1,11 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DynamicParent] +-- SqlServer.2017 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2017.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2017.LinqService).sql index 320cf0e89b4b..e12e87f698c9 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2017.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2017 (asynchronously) diff --git a/SqlServer.2017.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2017.LinqService).sql index 0decf73f7764..3b135a5705be 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2017.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2017 (asynchronously) diff --git a/SqlServer.2017.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..e44cb9a095c3 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2017.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..4bc0ea835f41 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2017.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..8a220d19e17a --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2017.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..90a4db1c216b --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2017.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..18d0f30d695a --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2017.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.LinqService,False).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.LinqService,False).sql new file mode 100644 index 000000000000..53b3ec36150e --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.LinqService,True).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.LinqService,True).sql new file mode 100644 index 000000000000..53b3ec36150e --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.LinqService,False).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.LinqService,False).sql new file mode 100644 index 000000000000..53b3ec36150e --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.LinqService,True).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.LinqService,True).sql new file mode 100644 index 000000000000..53b3ec36150e --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2017.LinqService).sql index 1db00c032521..5a6ea85b2982 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2017.LinqService).sql @@ -1,75 +1,13 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SqlServer.2017 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.LinqService,False).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.LinqService,False).sql index 8f3331dd8a99..03490764e9fb 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.LinqService,False).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.LinqService,True).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.LinqService,True).sql index 785c181739e4..3edd283c69dc 100644 --- a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.LinqService,True).sql +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.LinqService,False).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.LinqService,False).sql new file mode 100644 index 000000000000..464060e7bf9e --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.LinqService,True).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.LinqService,True).sql new file mode 100644 index 000000000000..464060e7bf9e --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.LinqService,False).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.LinqService,False).sql new file mode 100644 index 000000000000..478b2c12d5eb --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.LinqService,True).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.LinqService,True).sql new file mode 100644 index 000000000000..58defbe84a2d --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.LinqService,False).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.LinqService,False).sql new file mode 100644 index 000000000000..b8553042f3ac --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.LinqService,True).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.LinqService,True).sql new file mode 100644 index 000000000000..7dc2d8a55612 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.LinqService,False).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.LinqService,False).sql new file mode 100644 index 000000000000..136730c83065 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.LinqService,True).sql b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.LinqService,True).sql new file mode 100644 index 000000000000..c0848a4b0a07 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,False,False).sql b/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,False,False).sql index 5522164f84f4..cfa8c6e5ef23 100644 --- a/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,False,False).sql +++ b/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2017 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,False,True).sql b/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,False,True).sql index 7297884b0306..400523804bf3 100644 --- a/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,False,True).sql +++ b/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,False,True).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2017 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,True,False).sql b/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,True,False).sql index 1458c7575dfb..42fc013c2284 100644 --- a/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,True,False).sql +++ b/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,True,False).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2017 (asynchronously) + +CREATE TABLE [TestData]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,True,True).sql b/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,True,True).sql index 1ac31287d70f..a89018e83b3a 100644 --- a/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,True,True).sql +++ b/SqlServer.2017.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.LinqService,False,True,True).sql @@ -19,3 +19,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2017 (asynchronously) + +CREATE TABLE [TestData].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..4016a687e85c --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2017.LinqService).sql index 03eb32c057fa..879af6171b8b 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2017.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2017 SELECT @@ -7,3 +33,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..564debd010cf --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2017.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.LinqService,100).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.LinqService,100).sql index 4f403d995202..2af98ca79bc5 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.LinqService,100).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.LinqService,100).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.LinqService,200).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.LinqService,200).sql index 4f403d995202..2af98ca79bc5 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.LinqService,200).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.LinqService,200).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.LinqService,100).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.LinqService,100).sql index 228ff188f729..680558170b08 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.LinqService,100).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.LinqService,200).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.LinqService,200).sql index 228ff188f729..680558170b08 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.LinqService,200).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.LinqService,100).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.LinqService,100).sql index 4f403d995202..7d1255a6809d 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.LinqService,100).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.LinqService,200).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.LinqService,200).sql index 4f403d995202..0422ff4bb253 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.LinqService,200).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,100).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,100).sql index 228ff188f729..dcb95e440e16 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,100).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,200).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,200).sql index 228ff188f729..5566b75ddc18 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,200).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.LinqService,100).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.LinqService,100).sql index bbcb43455e3d..dc4bb61e6bf9 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.LinqService,100).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2017 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.LinqService,200).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.LinqService,200).sql index bbcb43455e3d..83d458c07482 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.LinqService,200).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2017 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.LinqService,100).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.LinqService,100).sql index 4f403d995202..c4a236d43769 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.LinqService,100).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.LinqService,200).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.LinqService,200).sql index 4f403d995202..c4a236d43769 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.LinqService,200).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,100).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,100).sql index 228ff188f729..bfd0b8da07e1 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,100).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,200).sql b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,200).sql index 228ff188f729..bfd0b8da07e1 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,200).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..a795f74ea0d3 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..fd6c1e5189e6 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..fd6c1e5189e6 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2017.LinqService).sql index 0f4aea8c97bf..6dd629efe30e 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2017.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2017 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,32 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2017.LinqService).sql index b9fa7b936513..0f4bea20491b 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2017.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..102445452dc2 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2017.LinqService).sql @@ -0,0 +1,149 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2017.LinqService).sql index b9fa7b936513..2070c50dfea4 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2017.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2017.LinqService).sql index b9fa7b936513..7305feb51df5 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2017.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2017.LinqService).sql index 8d0131c6d611..932e0677cc48 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2017.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2017 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2017.LinqService).sql index 8d0131c6d611..932e0677cc48 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2017.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2017 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2017.LinqService).sql index b5006da9694d..3a8d6d97fc42 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2017.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2017 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2017 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.LinqService,1).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.LinqService,1).sql index 74aa8d87f140..02b07c7b216a 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.LinqService,1).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017 +-- SqlServer.2017 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.LinqService,2).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.LinqService,2).sql index 74aa8d87f140..3c7284d9c74c 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.LinqService,2).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017 +-- SqlServer.2017 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,1).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,1).sql index 74aa8d87f140..8fab33aaefe7 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,1).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017 +-- SqlServer.2017 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,2).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,2).sql index 74aa8d87f140..c7339c061d4f 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,2).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017 +-- SqlServer.2017 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.LinqService,100).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.LinqService,100).sql index 51d03f71581c..9e57cba5c666 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.LinqService,100).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2017 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.LinqService,200).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.LinqService,200).sql index fce9bcf079c6..1c885d757057 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.LinqService,200).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2017 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.LinqService,100).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.LinqService,100).sql index b0182e6678ef..50a72174077f 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.LinqService,100).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2017 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.LinqService,200).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.LinqService,200).sql index 0f7583e0f8bf..d19d80d16175 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.LinqService,200).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2017 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.LinqService,1).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.LinqService,1).sql index 74aa8d87f140..7182ee5dba02 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.LinqService,1).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017 +-- SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.LinqService,2).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.LinqService,2).sql index 74aa8d87f140..2ad8b344bea2 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.LinqService,2).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017 +-- SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,1).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,1).sql index 74aa8d87f140..8fab33aaefe7 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,1).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017 +-- SqlServer.2017 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,2).sql b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,2).sql index 74aa8d87f140..c7339c061d4f 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,2).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017 +-- SqlServer.2017 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2017.LinqService).sql index fe56e5e8c11c..7b752e9e2cc4 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2017.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2017 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2017.LinqService).sql index fe56e5e8c11c..de91ce7ea1f6 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2017.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2017 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2017.LinqService).sql index 97d121852292..29dad983e1c9 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2017.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2017 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2017 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2017.LinqService).sql index 97d121852292..3b7d61ea676d 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2017.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2017 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2017 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..d59ff4699d37 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..b420444e81c3 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..b420444e81c3 --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..ed56c07f296e --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..650a08a0dc2c --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2017.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..650a08a0dc2c --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2017.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2017.LinqService).sql new file mode 100644 index 000000000000..1046e0ef861a --- /dev/null +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2017.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2017.LinqService).sql index cf6d451a3ac4..98e90d935622 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2017.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql index 18dc9a27e259..f2a31ef391e0 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2017 SELECT diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql index 498a04d5cc92..839ff4baf916 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql index 498a04d5cc92..64108183eb0f 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2017.LinqService).sql index 0a394f44a1c2..97286789618d 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2017.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2017 SELECT diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql index 498a04d5cc92..6daa4f3d0e38 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.LinqService).sql index 498a04d5cc92..47017217eef9 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql index 498a04d5cc92..3a1929924ff2 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql index 498a04d5cc92..5745fa80c27d 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.LinqService).sql index 498a04d5cc92..bb19267ecee3 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql index 498a04d5cc92..dcc819a136ea 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql index 18dc9a27e259..f2a31ef391e0 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2017 SELECT diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql index 498a04d5cc92..839ff4baf916 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql index 498a04d5cc92..64108183eb0f 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2017.LinqService).sql index 0a394f44a1c2..97286789618d 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2017.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2017 SELECT diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql index 498a04d5cc92..6daa4f3d0e38 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.LinqService).sql index 498a04d5cc92..47017217eef9 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql index 498a04d5cc92..3a1929924ff2 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql index 498a04d5cc92..5745fa80c27d 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.LinqService).sql index 498a04d5cc92..bb19267ecee3 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql index 498a04d5cc92..dcc819a136ea 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql index ae7bcf928c24..6ddfe1ab4ab9 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2017 SELECT diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql index 175c52cc0a08..f4c438b1184b 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql index 175c52cc0a08..e07f3899f56c 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql index 175c52cc0a08..a4b0d220db03 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql index 175c52cc0a08..8ebc0f803c17 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql index 175c52cc0a08..fa970bd5f2af 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.LinqService).sql index 175c52cc0a08..8bb7c9a89b8f 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2017.LinqService).sql index ae7bcf928c24..3e5fbf9ba394 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2017.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2017 SELECT diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql index ae7bcf928c24..e5421414a52e 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2017.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2017 SELECT diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql index 175c52cc0a08..e40d96c91723 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2017.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql index 175c52cc0a08..993b69405ef9 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql index 175c52cc0a08..0f3b70ddb469 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2017.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql index 175c52cc0a08..d3ede699a4d4 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql index 175c52cc0a08..417eeddaf596 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.LinqService).sql index 175c52cc0a08..02a4f339c458 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2017.LinqService).sql b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2017.LinqService).sql index ae7bcf928c24..a9087175856f 100644 --- a/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2017.LinqService).sql +++ b/SqlServer.2017.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2017.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2017 SELECT diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..13cf4b740730 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..7f47b1cc4928 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..04ae4eb6387f --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..39dfba20af31 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..04ae4eb6387f --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..39dfba20af31 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..501a3dfa0e52 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..2bd5f8d56930 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2017.MS.LinqService).sql index f5fd1836ab7c..6daae3e5b23e 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2017.MS.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..b60b5ee438ce --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..40e651d44044 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..40e651d44044 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..3e8ec8f575eb --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..3e8ec8f575eb --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..86999bdb617d --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..50a2f8387a4c --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..004387adc77b --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..3d77f22b1490 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..3d77f22b1490 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..72fcd35e2b2c --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..72fcd35e2b2c --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..880f6ecf9a3e --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..880f6ecf9a3e --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2017.MS.LinqService).sql index 74fb3b57acbe..7f5509815ce5 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2017.MS.LinqService).sql @@ -1,161 +1,15 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2017.MS.LinqService).sql index 74fb3b57acbe..4e093e6ef9cc 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2017.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2017.MS.LinqService).sql index 74fb3b57acbe..7bb6c94bc7ee 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2017.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2017.MS.LinqService).sql index 74fb3b57acbe..7bb6c94bc7ee 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2017.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2017.MS.LinqService).sql index 74fb3b57acbe..4e093e6ef9cc 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2017.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2017.MS.LinqService).sql index 74fb3b57acbe..836e25c36a53 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2017.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2017.MS.LinqService).sql index 74fb3b57acbe..1626c8c78d64 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2017.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2017.MS.LinqService).sql index 74fb3b57acbe..8307bd5ac8e1 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2017.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2017.MS.LinqService).sql index 74fb3b57acbe..8307bd5ac8e1 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2017.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..447f50a68c84 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2017.MS.LinqService).sql index 9a18b8dbf53b..fd881cb4c2b5 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2017.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2017.MS.LinqService).sql index b5657c94e1a4..d5fdb4c21a46 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2017.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..09bbc5d4798f --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..ab6e642dee97 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..d533e86f5f2d --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2017.MS.LinqService).sql index 4a0aba39a0be..61fe4834a896 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2017.MS.LinqService).sql @@ -1,43 +1,11 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DynamicParent] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2017.MS.LinqService).sql index 4fadcaefe0af..9d6e382fa417 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2017.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2017.MS SqlServer.2017 (asynchronously) diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2017.MS.LinqService).sql index acc3a9c97aa2..7992d8fd7427 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2017.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2017.MS SqlServer.2017 (asynchronously) diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..26bc3188f441 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..ac7e8a65da69 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..aa6efc02546a --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..e6bc19fad981 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..e9e296d8896f --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.MS.LinqService,False).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.MS.LinqService,False).sql new file mode 100644 index 000000000000..fad400600cb1 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.MS.LinqService,True).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.MS.LinqService,True).sql new file mode 100644 index 000000000000..fad400600cb1 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2017.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.MS.LinqService,False).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.MS.LinqService,False).sql new file mode 100644 index 000000000000..fad400600cb1 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.MS.LinqService,True).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.MS.LinqService,True).sql new file mode 100644 index 000000000000..fad400600cb1 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2017.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2017.MS.LinqService).sql index b37a963272b4..21065a94bba6 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2017.MS.LinqService).sql @@ -1,75 +1,13 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.MS.LinqService,False).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.MS.LinqService,False).sql index 7f0ae933b18b..f7c203800095 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.MS.LinqService,False).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.MS.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.MS.LinqService,True).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.MS.LinqService,True).sql index 323186840ce8..f1dae32a401c 100644 --- a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.MS.LinqService,True).sql +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2017.MS.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.MS.LinqService,False).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.MS.LinqService,False).sql new file mode 100644 index 000000000000..0df64498c95e --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.MS.LinqService,True).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.MS.LinqService,True).sql new file mode 100644 index 000000000000..0df64498c95e --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2017.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.MS.LinqService,False).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.MS.LinqService,False).sql new file mode 100644 index 000000000000..11198f8f0548 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.MS.LinqService,True).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.MS.LinqService,True).sql new file mode 100644 index 000000000000..9f2b7307252e --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2017.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.MS.LinqService,False).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.MS.LinqService,False).sql new file mode 100644 index 000000000000..d3cb7d29b816 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.MS.LinqService,True).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.MS.LinqService,True).sql new file mode 100644 index 000000000000..b830271ff722 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2017.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.MS.LinqService,False).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.MS.LinqService,False).sql new file mode 100644 index 000000000000..acb832c2bf37 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.MS.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.MS.LinqService,True).sql b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.MS.LinqService,True).sql new file mode 100644 index 000000000000..e30f3a88f875 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2017.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,False,False).sql b/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,False,False).sql index 63b76463dafa..9898b2d88d00 100644 --- a/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,False,False).sql +++ b/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,False,True).sql b/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,False,True).sql index 7bfd7a6ba761..7f11222787ec 100644 --- a/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,False,True).sql +++ b/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,False,True).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,True,False).sql b/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,True,False).sql index a0957a24eaa3..b46deb9abdde 100644 --- a/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,True,False).sql +++ b/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,True,False).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +CREATE TABLE [TestDataMS]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,True,True).sql b/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,True,True).sql index c6a804cdef9e..56787341a33f 100644 --- a/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,True,True).sql +++ b/SqlServer.2017.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2017.MS.LinqService,False,True,True).sql @@ -19,3 +19,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +CREATE TABLE [TestDataMS].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..b53fa00b5cab --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2017.MS.LinqService).sql index 82e624a536b9..a256aa351e9d 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2017.MS.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 SELECT @@ -7,3 +33,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..5f820d82944f --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.MS.LinqService,100).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.MS.LinqService,100).sql index f00036ae243d..91e8ac6f9ea1 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.MS.LinqService,100).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.MS.LinqService,100).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.MS.LinqService,200).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.MS.LinqService,200).sql index f00036ae243d..91e8ac6f9ea1 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.MS.LinqService,200).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2017.MS.LinqService,200).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,100).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,100).sql index d0737f4c7e44..e0f244945ef2 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,100).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,200).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,200).sql index d0737f4c7e44..e0f244945ef2 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,200).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.MS.LinqService,100).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.MS.LinqService,100).sql index f00036ae243d..a9d232d06f4f 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.MS.LinqService,100).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.MS.LinqService,200).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.MS.LinqService,200).sql index f00036ae243d..6147075df846 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.MS.LinqService,200).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2017.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,100).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,100).sql index d0737f4c7e44..7a0a17d2cce6 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,100).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,200).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,200).sql index d0737f4c7e44..52499c8e671a 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,200).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.MS.LinqService,100).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.MS.LinqService,100).sql index 78756518f40d..68844a4f5dcf 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.MS.LinqService,100).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.MS.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.MS.LinqService,200).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.MS.LinqService,200).sql index 78756518f40d..85f56ee72680 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.MS.LinqService,200).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2017.MS.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.MS.LinqService,100).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.MS.LinqService,100).sql index f00036ae243d..9783f94a2e19 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.MS.LinqService,100).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.MS.LinqService,200).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.MS.LinqService,200).sql index f00036ae243d..9783f94a2e19 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.MS.LinqService,200).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2017.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,100).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,100).sql index d0737f4c7e44..136716ae2eec 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,100).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,200).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,200).sql index d0737f4c7e44..136716ae2eec 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,200).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2017.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..b9d98211c070 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..6f82c22e9497 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..6f82c22e9497 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2017.MS.LinqService).sql index 21dd0e9d1d38..cbd6827da8c5 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2017.MS.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,32 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2017.MS.LinqService).sql index 8857664d37f5..029ac1e48764 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2017.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..3d40a9502417 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,149 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2017.MS.LinqService).sql index 8857664d37f5..c1c4e0ca9af2 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2017.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2017.MS.LinqService).sql index 8857664d37f5..c67151e0e309 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2017.MS.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2017.MS.LinqService).sql index f14ad13f9da9..68a6efb0e7bf 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2017.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2017.MS.LinqService).sql index f14ad13f9da9..68a6efb0e7bf 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2017.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2017.MS.LinqService).sql index 4b0d43b1afaf..326474f7c10a 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2017.MS.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,1).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,1).sql index a1d4c7ee1ebe..ae856e77a736 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,1).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,2).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,2).sql index a1d4c7ee1ebe..c69c8a683220 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,2).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,1).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,1).sql index a1d4c7ee1ebe..e637771eeaf7 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,1).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,2).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,2).sql index a1d4c7ee1ebe..c8df86e354f5 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,2).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.MS.LinqService,100).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.MS.LinqService,100).sql index 0a8b74be8951..fdb33e6cc1a7 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.MS.LinqService,100).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.MS.LinqService,200).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.MS.LinqService,200).sql index 487d4e57061a..1cca2da2bcdd 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.MS.LinqService,200).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2017.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.MS.LinqService,100).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.MS.LinqService,100).sql index fb2be9b751bd..84edec707375 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.MS.LinqService,100).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.MS.LinqService,200).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.MS.LinqService,200).sql index f401d4f38a6d..43490c853408 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.MS.LinqService,200).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2017.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,1).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,1).sql index a1d4c7ee1ebe..268bcbf79b41 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,1).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,2).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,2).sql index a1d4c7ee1ebe..6670b108486d 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,2).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2017.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,1).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,1).sql index a1d4c7ee1ebe..e637771eeaf7 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,1).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,2).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,2).sql index a1d4c7ee1ebe..c8df86e354f5 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,2).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2017.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2017.MS.LinqService).sql index 558f8dd14746..1ec1888542ad 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2017.MS.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2017.MS.LinqService).sql index 558f8dd14746..c3f916a0f55f 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2017.MS.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2017.MS.LinqService).sql index 4d19bae0da78..d565de4f96e6 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2017.MS.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2017.MS.LinqService).sql index 4d19bae0da78..f596d31680d9 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2017.MS.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2017.MS SqlServer.2017 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..155a3ee9907f --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..8371b84500e8 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..8371b84500e8 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..4950da327d7a --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..b0b8fc942750 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..b0b8fc942750 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2017.MS.LinqService).sql new file mode 100644 index 000000000000..31fc39478119 --- /dev/null +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2017.MS.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2017.MS.LinqService).sql index 80a8d6a87ed3..4bf1d4320b69 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2017.MS.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql index 50b390b17404..cfa7c9079b1d 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 SELECT diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql index b608da4828bb..ff6eef9a2a5e 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql index b608da4828bb..1afe1e18ce3b 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql index 1f2d93eec298..04039f9d7137 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 SELECT diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql index b608da4828bb..49b68b2c9579 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.MS.LinqService).sql index b608da4828bb..b06edb8a81dd 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql index b608da4828bb..2ce5307a3da2 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql index b608da4828bb..28a399d17998 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.MS.LinqService).sql index b608da4828bb..552638b73761 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql index b608da4828bb..6e38a21eb00b 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql index 50b390b17404..cfa7c9079b1d 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 SELECT diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql index b608da4828bb..ff6eef9a2a5e 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql index b608da4828bb..1afe1e18ce3b 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql index 1f2d93eec298..04039f9d7137 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 SELECT diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql index b608da4828bb..49b68b2c9579 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.MS.LinqService).sql index b608da4828bb..b06edb8a81dd 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql index b608da4828bb..2ce5307a3da2 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql index b608da4828bb..28a399d17998 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.MS.LinqService).sql index b608da4828bb..552638b73761 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql index b608da4828bb..6e38a21eb00b 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2017.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql index 48a876c473c8..3d5f9fd30cab 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 SELECT diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql index 1f193d0c6cc0..a2ed4b449158 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql index 1f193d0c6cc0..2f1306ad6754 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql index 1f193d0c6cc0..a4a8a1f1e652 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql index 1f193d0c6cc0..c6b9e1c9a1cc 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql index 1f193d0c6cc0..2baad357233e 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.MS.LinqService).sql index 1f193d0c6cc0..e3373bfd91b3 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.MS.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2017.MS.LinqService).sql index 48a876c473c8..13c2b0db8800 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2017.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 SELECT diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql index 48a876c473c8..0078f2fe989b 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 SELECT diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql index 1f193d0c6cc0..8fb0c5b9433a 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql index 1f193d0c6cc0..4cb5a6c3316f 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql index 1f193d0c6cc0..ac41674d3bcf 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2017.MS.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql index 1f193d0c6cc0..41838437fc47 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2017.MS.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql index 1f193d0c6cc0..07f6b163e47e 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2017.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.MS.LinqService).sql index 1f193d0c6cc0..395e01a6d1d8 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2017.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2017.MS SqlServer.2017 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2017.MS.LinqService).sql b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2017.MS.LinqService).sql index 48a876c473c8..92161923a96a 100644 --- a/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2017.MS.LinqService).sql +++ b/SqlServer.2017.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2017.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2017.MS SqlServer.2017 SELECT diff --git a/SqlServer.2017.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2017.MS).sql b/SqlServer.2017.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2017.MS).sql new file mode 100644 index 000000000000..e04c1f8c0fca --- /dev/null +++ b/SqlServer.2017.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2017.MS).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2017.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2017.MS).sql b/SqlServer.2017.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2017.MS).sql new file mode 100644 index 000000000000..04ae4eb6387f --- /dev/null +++ b/SqlServer.2017.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2017.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2017.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2017.MS).sql b/SqlServer.2017.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2017.MS).sql new file mode 100644 index 000000000000..04ae4eb6387f --- /dev/null +++ b/SqlServer.2017.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2017.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2017.MS SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2017/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2017).sql b/SqlServer.2017/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2017).sql new file mode 100644 index 000000000000..d01538c3bc94 --- /dev/null +++ b/SqlServer.2017/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2017).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2017/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2017).sql b/SqlServer.2017/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2017).sql new file mode 100644 index 000000000000..14d24131ab01 --- /dev/null +++ b/SqlServer.2017/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2017).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2017/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2017).sql b/SqlServer.2017/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2017).sql new file mode 100644 index 000000000000..14d24131ab01 --- /dev/null +++ b/SqlServer.2017/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2017).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2017 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From 9e93816b750b13f8396e3ce259d4874265a967f7 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:45:56 +0000 Subject: [PATCH 14/40] [Linux / MariaDB 11] baselines --- ...ests.All4Async(MariaDB.11.LinqService).sql | 13 ++ ....GroupBy2Async(MariaDB.11.LinqService).sql | 30 +++ ...numerable1Test(MariaDB.11.LinqService).sql | 9 + ...numerable2Test(MariaDB.11.LinqService).sql | 11 + ...rableCast1Test(MariaDB.11.LinqService).sql | 9 + ...rableCast2Test(MariaDB.11.LinqService).sql | 11 + ...tainsAsyncTest(MariaDB.11.LinqService).sql | 17 ++ ...FirstAsyncTest(MariaDB.11.LinqService).sql | 15 ++ ...s.TakeSkipTest(MariaDB.11.LinqService).sql | 16 ++ ...FirstOrDefault(MariaDB.11.LinqService).sql | 20 ++ ...ookupAsyncTest(MariaDB.11.LinqService).sql | 21 ++ ...ementAsyncTest(MariaDB.11.LinqService).sql | 21 ++ ...s.AnyTestAsync(MariaDB.11.LinqService).sql | 30 +++ ....AnyTestAsync2(MariaDB.11.LinqService).sql | 30 +++ ...ethoAsyncdTest(MariaDB.11.LinqService).sql | 16 ++ ...iledTest3Async(MariaDB.11.LinqService).sql | 28 +++ ...tainsTestAsync(MariaDB.11.LinqService).sql | 34 +++ ...CountTestAsync(MariaDB.11.LinqService).sql | 24 ++ ...ountTestAsync2(MariaDB.11.LinqService).sql | 24 ++ ...mentTestAsync1(MariaDB.11.LinqService).sql | 28 +++ ...mentTestAsync2(MariaDB.11.LinqService).sql | 28 +++ ...s.MaxTestAsync(MariaDB.11.LinqService).sql | 24 ++ ....MaxTestAsync2(MariaDB.11.LinqService).sql | 24 ++ ...PredicateAsync(MariaDB.11.LinqService).sql | 171 ++------------ ...PredicateAsync(MariaDB.11.LinqService).sql | 168 +------------- ...PredicateAsync(MariaDB.11.LinqService).sql | 170 +------------- ...PredicateAsync(MariaDB.11.LinqService).sql | 170 +------------- ...PredicateAsync(MariaDB.11.LinqService).sql | 168 +------------- ...xSelectorAsync(MariaDB.11.LinqService).sql | 168 +------------- ...nSelectorAsync(MariaDB.11.LinqService).sql | 168 +------------- ...PredicateAsync(MariaDB.11.LinqService).sql | 170 +------------- ...PredicateAsync(MariaDB.11.LinqService).sql | 170 +------------- ...s.Concat1Async(MariaDB.11.LinqService).sql | 19 ++ ...IncrementAsync(MariaDB.11.LinqService).sql | 99 ++++++++ ...tFilteredAsync(MariaDB.11.LinqService).sql | 84 +++++++ ...ts.Count1Async(MariaDB.11.LinqService).sql | 8 + ...ts.Count2Async(MariaDB.11.LinqService).sql | 10 + ...QueryMax1Async(MariaDB.11.LinqService).sql | 16 ++ ...ests.Issue4602(MariaDB.11.LinqService).sql | 48 +--- ...ssue4057_Async(MariaDB.11.LinqService).sql | 31 +++ ...citTransaction(MariaDB.11.LinqService).sql | 31 +++ ...xpressionAsync(MariaDB.11.LinqService).sql | 25 ++ ...sts.Cast1Async(MariaDB.11.LinqService).sql | 11 + ...ts.Test18Async(MariaDB.11.LinqService).sql | 14 ++ ...arameter1Async(MariaDB.11.LinqService).sql | 6 + ....Issue3132Test(MariaDB.11.LinqService).sql | 213 ++++++++++++++++++ ...At2Async(MariaDB.11.LinqService,False).sql | 16 ++ ...tAt2Async(MariaDB.11.LinqService,True).sql | 16 ++ ...lt3Async(MariaDB.11.LinqService,False).sql | 16 ++ ...ult3Async(MariaDB.11.LinqService,True).sql | 16 ++ ...ipleSkip1Async(MariaDB.11.LinqService).sql | 83 +------ ...ke1Async(MariaDB.11.LinqService,False).sql | 20 ++ ...ake1Async(MariaDB.11.LinqService,True).sql | 24 ++ ...ke2Async(MariaDB.11.LinqService,False).sql | 12 + ...ake2Async(MariaDB.11.LinqService,True).sql | 12 + ...ke3Async(MariaDB.11.LinqService,False).sql | 12 + ...ake3Async(MariaDB.11.LinqService,True).sql | 14 ++ ...ke4Async(MariaDB.11.LinqService,False).sql | 12 + ...ake4Async(MariaDB.11.LinqService,True).sql | 14 ++ ...ke5Async(MariaDB.11.LinqService,False).sql | 10 + ...ake5Async(MariaDB.11.LinqService,True).sql | 12 + ...iaDB.11.LinqService,False,False,False).sql | 16 ++ ...riaDB.11.LinqService,False,False,True).sql | 16 ++ ...riaDB.11.LinqService,False,True,False).sql | 16 ++ ...ariaDB.11.LinqService,False,True,True).sql | 16 ++ ...riaDB.11.LinqService,True,False,False).sql | 16 ++ ...ariaDB.11.LinqService,True,False,True).sql | 16 ++ ...ariaDB.11.LinqService,True,True,False).sql | 16 ++ ...MariaDB.11.LinqService,True,True,True).sql | 16 ++ ...ateTable1Async(MariaDB.11.LinqService).sql | 34 +++ ...eateTableAsync(MariaDB.11.LinqService).sql | 30 +++ ...TableNameAsync(MariaDB.11.LinqService).sql | 90 ++++++++ ...tAsyncTest(MariaDB.11.LinqService,100).sql | 18 ++ ...tAsyncTest(MariaDB.11.LinqService,200).sql | 18 ++ ...ngleRecord(MariaDB.11.LinqService,100).sql | 13 ++ ...ngleRecord(MariaDB.11.LinqService,200).sql | 13 ++ ...yAsyncTest(MariaDB.11.LinqService,100).sql | 15 ++ ...yAsyncTest(MariaDB.11.LinqService,200).sql | 15 ++ ...ngleRecord(MariaDB.11.LinqService,100).sql | 15 ++ ...ngleRecord(MariaDB.11.LinqService,200).sql | 15 ++ ...yAsyncTest(MariaDB.11.LinqService,100).sql | 12 + ...yAsyncTest(MariaDB.11.LinqService,200).sql | 12 + ...ngleRecord(MariaDB.11.LinqService,100).sql | 12 + ...ngleRecord(MariaDB.11.LinqService,200).sql | 12 + ...s.Insert2Async(MariaDB.11.LinqService).sql | 46 ++++ ...s.Insert3Async(MariaDB.11.LinqService).sql | 48 ++++ ...s.Insert4Async(MariaDB.11.LinqService).sql | 48 ++++ ...TableNameAsync(MariaDB.11.LinqService).sql | 69 ++++++ ...rReplace1Async(MariaDB.11.LinqService).sql | 74 ++++++ ...TableNameAsync(MariaDB.11.LinqService).sql | 117 ++++++++++ ...OrUpdate3Async(MariaDB.11.LinqService).sql | 74 ++++++ ...rUpdate3xAsync(MariaDB.11.LinqService).sql | 74 ++++++ ...Identity1Async(MariaDB.11.LinqService).sql | 15 ++ ...Identity2Async(MariaDB.11.LinqService).sql | 15 ++ ...Identity4Async(MariaDB.11.LinqService).sql | 34 +++ ...ObjAsyncTest(MariaDB.11.LinqService,1).sql | 36 +-- ...ObjAsyncTest(MariaDB.11.LinqService,2).sql | 36 +-- ...terAsyncTest(MariaDB.11.LinqService,1).sql | 36 +-- ...terAsyncTest(MariaDB.11.LinqService,2).sql | 36 +-- ...yTestAsync(MariaDB.11.LinqService,100).sql | 24 ++ ...yTestAsync(MariaDB.11.LinqService,200).sql | 24 ++ ...ngleRecord(MariaDB.11.LinqService,100).sql | 24 ++ ...ngleRecord(MariaDB.11.LinqService,200).sql | 24 ++ ...ObjAsyncTest(MariaDB.11.LinqService,1).sql | 36 +-- ...ObjAsyncTest(MariaDB.11.LinqService,2).sql | 36 +-- ...terAsyncTest(MariaDB.11.LinqService,1).sql | 36 +-- ...terAsyncTest(MariaDB.11.LinqService,2).sql | 36 +-- ....Update12Async(MariaDB.11.LinqService).sql | 11 + ...s.Update1Async(MariaDB.11.LinqService).sql | 54 +++++ ...s.Update2Async(MariaDB.11.LinqService).sql | 54 +++++ ...s.Update4Async(MariaDB.11.LinqService).sql | 53 +++++ ...ociation1Async(MariaDB.11.LinqService).sql | 39 ++++ ...ation1AsyncOld(MariaDB.11.LinqService).sql | 39 ++++ ...TableNameAsync(MariaDB.11.LinqService).sql | 107 +++++++++ ...eComplex1Async(MariaDB.11.LinqService).sql | 57 +++++ ...Tests.Linq.AsyncTests.Test(MariaDB.11).sql | 18 ++ ...ests.Linq.AsyncTests.Test1(MariaDB.11).sql | 9 + ...inq.AsyncTests.TestForEach(MariaDB.11).sql | 9 + 118 files changed, 3157 insertions(+), 1653 deletions(-) create mode 100644 MariaDB.11.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MariaDB.11.LinqService,False).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MariaDB.11.LinqService,True).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MariaDB.11.LinqService,False).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MariaDB.11.LinqService,True).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MariaDB.11.LinqService,False).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MariaDB.11.LinqService,True).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MariaDB.11.LinqService,False).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MariaDB.11.LinqService,True).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MariaDB.11.LinqService,False).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MariaDB.11.LinqService,True).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MariaDB.11.LinqService,False).sql create mode 100644 MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MariaDB.11.LinqService,True).sql create mode 100644 MariaDB.11.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MariaDB.11.LinqService).sql create mode 100644 MariaDB.11/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MariaDB.11).sql create mode 100644 MariaDB.11/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MariaDB.11).sql create mode 100644 MariaDB.11/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MariaDB.11).sql diff --git a/MariaDB.11.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..e64a5f86ded3 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MariaDB.11.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` <= 3 + ) as `c1` + diff --git a/MariaDB.11.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..bf4ca5960374 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MariaDB.11.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT DISTINCT + `a_Parent1`.`ParentID` + FROM + `Child` `t1` + INNER JOIN `Parent` `a_Parent1` ON `t1`.`ParentID` = `a_Parent1`.`ParentID` + ) `m_1` + INNER JOIN (`Child` `d` + INNER JOIN `Parent` `a_Parent1_1` ON `d`.`ParentID` = `a_Parent1_1`.`ParentID`) + ON `m_1`.`ParentID` = `a_Parent1_1`.`ParentID` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `a_Parent1`.`ParentID` +FROM + `Child` `t1` + INNER JOIN `Parent` `a_Parent1` ON `t1`.`ParentID` = `a_Parent1`.`ParentID` +GROUP BY + `a_Parent1`.`ParentID` + diff --git a/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..0d42eda41c0d --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MariaDB.11.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..b10ecbf6620b --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MariaDB.11.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` > 1 + diff --git a/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..0d42eda41c0d --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MariaDB.11.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..b10ecbf6620b --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MariaDB.11.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` > 1 + diff --git a/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..889b45a974ce --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MariaDB.11.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + `t1`.`PersonID` + FROM + `Person` `t1` + ) + THEN 1 + ELSE 0 + END as `c1` + diff --git a/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..1a420013ad90 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MariaDB.11.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`PersonID` = 1 +LIMIT 1 + diff --git a/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MariaDB.11.LinqService).sql index f783b4f39b96..8de7521ffe86 100644 --- a/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MariaDB.11.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY `t1`.`ParentID` LIMIT @skip, @take +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @skip Int32 +SET @skip = 1 +DECLARE @take Int32 +SET @take = 2 + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` +ORDER BY + `t1`.`ParentID` +LIMIT @skip, @take + diff --git a/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..8982a50e96c9 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MariaDB.11.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1 +DECLARE @p_1 Int32 +SET @p_1 = 2 +DECLARE @p_2 Int32 +SET @p_2 = 3 +DECLARE @param Int32 +SET @param = 4 + +SELECT + `o`.`ParentID`, + `o`.`Value1` +FROM + `Parent` `o` +WHERE + `o`.`ParentID` IN (@p, @p_1, @p_2) OR `o`.`ParentID` = @param +LIMIT 1 + diff --git a/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..d66576c947b6 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MariaDB.11.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +ORDER BY + `t1`.`ParentID`, + `t1`.`ChildID` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` + diff --git a/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..d66576c947b6 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MariaDB.11.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +ORDER BY + `t1`.`ParentID`, + `t1`.`ChildID` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` + diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..7f12b90cc7a4 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MariaDB.11.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..7f12b90cc7a4 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MariaDB.11.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..8796bed82abe --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MariaDB.11.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = @p +ORDER BY + `x`.`ParentID` DESC +LIMIT 1 + diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..9ddc4db7b087 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MariaDB.11.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT @p + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT @p + diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..53fb2bf0ea10 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MariaDB.11.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + `c_1`.`ParentID` + FROM + `Child` `c_1` + ) + THEN 1 + ELSE 0 + END as `c1` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + `c_1`.`ParentID` + FROM + `Child` `c_1` + ) + THEN 1 + ELSE 0 + END as `c1` + diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..b0d153c8b51e --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MariaDB.11.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..b0d153c8b51e --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MariaDB.11.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..be268e4be656 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MariaDB.11.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..be268e4be656 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MariaDB.11.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..85508614a4c8 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MariaDB.11.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..85508614a4c8 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MariaDB.11.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MariaDB.11.LinqService).sql index b1e371d74fbc..de8a8b29426e 100644 --- a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MariaDB.11.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + `AsyncDataTable` `c_1` + WHERE + `c_1`.`Id` = @p + ) as `c1` diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MariaDB.11.LinqService).sql index b1e371d74fbc..4bd89e89dc79 100644 --- a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MariaDB.11.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MariaDB.11.LinqService).sql index b1e371d74fbc..5f0357db55ad 100644 --- a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MariaDB.11.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 1 diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MariaDB.11.LinqService).sql index b1e371d74fbc..5f0357db55ad 100644 --- a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MariaDB.11.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 1 diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MariaDB.11.LinqService).sql index b1e371d74fbc..4bd89e89dc79 100644 --- a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MariaDB.11.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MariaDB.11.LinqService).sql index b1e371d74fbc..11831b4eb202 100644 --- a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MariaDB.11.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MAX(`c_1`.`Id`) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` > @p diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MariaDB.11.LinqService).sql index b1e371d74fbc..48655c0df479 100644 --- a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MariaDB.11.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MIN(`c_1`.`Id`) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` > @p diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MariaDB.11.LinqService).sql index b1e371d74fbc..1c505cd771c2 100644 --- a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MariaDB.11.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 2 diff --git a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MariaDB.11.LinqService).sql index b1e371d74fbc..1c505cd771c2 100644 --- a/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MariaDB.11.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 2 diff --git a/MariaDB.11.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..b1ce10c569a8 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MariaDB.11.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = 1 +UNION ALL +SELECT + `p_1`.`ParentID`, + `p_1`.`Value1` +FROM + `Parent` `p_1` +WHERE + `p_1`.`ParentID` = 2 + diff --git a/MariaDB.11.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MariaDB.11.LinqService).sql index 6c37e6d235d2..1143ad558328 100644 --- a/MariaDB.11.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MariaDB.11.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO `ConcurrencyAutoIncrement` +( + `Id`, + `Stamp`, + `Value` +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql SELECT @@ -8,6 +30,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql @@ -18,6 +57,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql @@ -28,6 +84,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql @@ -38,6 +111,19 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyAutoIncrement` +WHERE + `ConcurrencyAutoIncrement`.`Id` = @Id AND `ConcurrencyAutoIncrement`.`Stamp` = @Stamp + BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql @@ -48,6 +134,19 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -8 + +DELETE +FROM + `ConcurrencyAutoIncrement` +WHERE + `ConcurrencyAutoIncrement`.`Id` = @Id AND `ConcurrencyAutoIncrement`.`Stamp` = @Stamp + BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql diff --git a/MariaDB.11.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MariaDB.11.LinqService).sql index 01ae962feb32..d3a11eab6fca 100644 --- a/MariaDB.11.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MariaDB.11.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO `ConcurrencyFiltered` +( + `Id`, + `Stamp`, + `Value` +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql SELECT @@ -8,6 +30,23 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyFiltered` `r` +SET + `r`.`Stamp` = `r`.`Stamp` + 1, + `r`.`Value` = @Value +WHERE + `r`.`Id` = 2 AND `r`.`Id` = @Id AND `r`.`Stamp` = @Stamp + BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql @@ -18,6 +57,23 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyFiltered` `r` +SET + `r`.`Stamp` = `r`.`Stamp` + 1, + `r`.`Value` = @Value +WHERE + `r`.`Id` = 1 AND `r`.`Id` = @Id AND `r`.`Stamp` = @Stamp + BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql @@ -28,6 +84,20 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyFiltered` +WHERE + `ConcurrencyFiltered`.`Id` = 2 AND `ConcurrencyFiltered`.`Id` = @Id AND + `ConcurrencyFiltered`.`Stamp` = @Stamp + BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql @@ -38,6 +108,20 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyFiltered` +WHERE + `ConcurrencyFiltered`.`Id` = 1 AND `ConcurrencyFiltered`.`Id` = @Id AND + `ConcurrencyFiltered`.`Stamp` = @Stamp + BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql diff --git a/MariaDB.11.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..b76e092fe4bc --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MariaDB.11.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + COUNT(*) +FROM + `Parent` `t1` + diff --git a/MariaDB.11.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..d916b7672065 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MariaDB.11.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 2 + diff --git a/MariaDB.11.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..63f0b5bc238a --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MariaDB.11.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + `Child` `c_1` + LEFT JOIN `Parent` `a_Parent` ON `c_1`.`ParentID` = `a_Parent`.`ParentID` + WHERE + `a_Parent`.`ParentID` = `t1`.`ParentID` + )) +FROM + `Parent` `t1` + diff --git a/MariaDB.11.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MariaDB.11.LinqService).sql index 36d74ada6dfa..f35fb38d10eb 100644 --- a/MariaDB.11.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MariaDB.11.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `DynamicParent` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `DynamicParent` -( - `ID` INT AUTO_INCREMENT NOT NULL, - - CONSTRAINT `PK_DynamicParent` PRIMARY KEY CLUSTERED (`ID`) -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `DynamicChild` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `DynamicChild` -( - `ID` INT AUTO_INCREMENT NOT NULL, - `ParentID` INT NOT NULL, - - CONSTRAINT `PK_DynamicChild` PRIMARY KEY CLUSTERED (`ID`) -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `DynamicChild` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `DynamicParent` +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `it`.`ID` +FROM + `DynamicParent` `it` + LEFT JOIN `DynamicChild` `a_Child` ON `it`.`ID` = `a_Child`.`ParentID` +WHERE + `a_Child`.`ID` = 123 diff --git a/MariaDB.11.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MariaDB.11.LinqService).sql index 89f3b7dddd9a..622a151f5b65 100644 --- a/MariaDB.11.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MariaDB.11.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT + `x`.`ParentID` + FROM + `Parent` `x` + WHERE + `x`.`ParentID` = 3 + LIMIT 1 + ) `m_1` + INNER JOIN `Child` `d` ON `m_1`.`ParentID` = `d`.`ParentID` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) diff --git a/MariaDB.11.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MariaDB.11.LinqService).sql index 48774bc54ef9..f552738f78ab 100644 --- a/MariaDB.11.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MariaDB.11.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT + `x`.`ParentID` + FROM + `Parent` `x` + WHERE + `x`.`ParentID` = 3 + LIMIT 1 + ) `m_1` + INNER JOIN `Child` `d` ON `m_1`.`ParentID` = `d`.`ParentID` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) diff --git a/MariaDB.11.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..67e54ea028a2 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MariaDB.11.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + `Child` `a_Children` + INNER JOIN `GrandChild` `a_GrandChildren` ON `a_Children`.`ParentID` = `a_GrandChildren`.`ParentID` AND `a_Children`.`ChildID` = `a_GrandChildren`.`ChildID` + WHERE + `p`.`ParentID` = `a_Children`.`ParentID` + ) +FROM + `Parent` `p` + diff --git a/MariaDB.11.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..27b7fd3c6922 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MariaDB.11.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` +WHERE + `t1`.`Value1` = 1 + diff --git a/MariaDB.11.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..6b35db69809c --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MariaDB.11.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT DISTINCT + `p1`.`PersonID`, + `p1`.`Gender`, + `p1`.`FirstName`, + `p1`.`LastName` +FROM + `Person` `p1` +WHERE + `p1`.`PersonID` IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + `p1`.`Gender` = 'F' + diff --git a/MariaDB.11.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..20c4ef312188 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MariaDB.11.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + 1 as `c1` + diff --git a/MariaDB.11.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..96439144972d --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MariaDB.11.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `x`.`MiddleName`, + COUNT(*) +FROM + `Person` `x` +WHERE + `x`.`MiddleName` IS NOT NULL +GROUP BY + `x`.`MiddleName` +UNION ALL +SELECT + `x_1`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_1` +WHERE + `x_1`.`MiddleName` IS NOT NULL +GROUP BY + `x_1`.`MiddleName` +UNION ALL +SELECT + `x_2`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_2` +WHERE + `x_2`.`MiddleName` IS NOT NULL +GROUP BY + `x_2`.`MiddleName` +UNION ALL +SELECT + `x_3`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_3` +WHERE + `x_3`.`MiddleName` IS NOT NULL +GROUP BY + `x_3`.`MiddleName` +UNION ALL +SELECT + `x_4`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_4` +WHERE + `x_4`.`MiddleName` IS NOT NULL +GROUP BY + `x_4`.`MiddleName` +UNION ALL +SELECT + `x_5`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_5` +WHERE + `x_5`.`MiddleName` IS NOT NULL +GROUP BY + `x_5`.`MiddleName` +UNION ALL +SELECT + `x_6`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_6` +WHERE + `x_6`.`MiddleName` IS NOT NULL +GROUP BY + `x_6`.`MiddleName` +UNION ALL +SELECT + `x_7`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_7` +WHERE + `x_7`.`MiddleName` IS NOT NULL +GROUP BY + `x_7`.`MiddleName` +UNION ALL +SELECT + `x_8`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_8` +WHERE + `x_8`.`MiddleName` IS NOT NULL +GROUP BY + `x_8`.`MiddleName` +UNION ALL +SELECT + `x_9`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_9` +WHERE + `x_9`.`MiddleName` IS NOT NULL +GROUP BY + `x_9`.`MiddleName` +UNION ALL +SELECT + `x_10`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_10` +WHERE + `x_10`.`MiddleName` IS NOT NULL +GROUP BY + `x_10`.`MiddleName` +UNION ALL +SELECT + `x_11`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_11` +WHERE + `x_11`.`MiddleName` IS NOT NULL +GROUP BY + `x_11`.`MiddleName` +UNION ALL +SELECT + `x_12`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_12` +WHERE + `x_12`.`MiddleName` IS NOT NULL +GROUP BY + `x_12`.`MiddleName` +UNION ALL +SELECT + `x_13`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_13` +WHERE + `x_13`.`MiddleName` IS NOT NULL +GROUP BY + `x_13`.`MiddleName` +UNION ALL +SELECT + `x_14`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_14` +WHERE + `x_14`.`MiddleName` IS NOT NULL +GROUP BY + `x_14`.`MiddleName` +UNION ALL +SELECT + `x_15`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_15` +WHERE + `x_15`.`MiddleName` IS NOT NULL +GROUP BY + `x_15`.`MiddleName` +UNION ALL +SELECT + `x_16`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_16` +WHERE + `x_16`.`MiddleName` IS NOT NULL +GROUP BY + `x_16`.`MiddleName` +UNION ALL +SELECT + `x_17`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_17` +WHERE + `x_17`.`MiddleName` IS NOT NULL +GROUP BY + `x_17`.`MiddleName` +UNION ALL +SELECT + `x_18`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_18` +WHERE + `x_18`.`MiddleName` IS NOT NULL +GROUP BY + `x_18`.`MiddleName` +UNION ALL +SELECT + `x_19`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_19` +WHERE + `x_19`.`MiddleName` IS NOT NULL +GROUP BY + `x_19`.`MiddleName` +UNION ALL +SELECT + `x_20`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_20` +WHERE + `x_20`.`MiddleName` IS NOT NULL +GROUP BY + `x_20`.`MiddleName` + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MariaDB.11.LinqService,False).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MariaDB.11.LinqService,False).sql new file mode 100644 index 000000000000..021ee3e30b4e --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MariaDB.11.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MariaDB.11.LinqService,True).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MariaDB.11.LinqService,True).sql new file mode 100644 index 000000000000..021ee3e30b4e --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MariaDB.11.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MariaDB.11.LinqService,False).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MariaDB.11.LinqService,False).sql new file mode 100644 index 000000000000..021ee3e30b4e --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MariaDB.11.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MariaDB.11.LinqService,True).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MariaDB.11.LinqService,True).sql new file mode 100644 index 000000000000..021ee3e30b4e --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MariaDB.11.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MariaDB.11.LinqService).sql index 1daacd0dd765..d930c3938bc9 100644 --- a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MariaDB.11.LinqService).sql @@ -1,74 +1,13 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `TakeSkipClass` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `TakeSkipClass` -( - `Value` VARCHAR(10) NULL -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `TakeSkipClass` +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @skip Int32 +SET @skip = 3 + +SELECT + `t1`.`Value` +FROM + `TakeSkipClass` `t1` +ORDER BY + `t1`.`Value` +LIMIT @skip, 9223372036854775807 diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MariaDB.11.LinqService,False).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MariaDB.11.LinqService,False).sql index 5b11dacf9cf4..86aeaeb21ec5 100644 --- a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MariaDB.11.LinqService,False).sql +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MariaDB.11.LinqService,False).sql @@ -18,3 +18,23 @@ FROM `Child` `ch` LIMIT 3 +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT 2 + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT 3 + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MariaDB.11.LinqService,True).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MariaDB.11.LinqService,True).sql index fcbc66551eac..ccee037cd69f 100644 --- a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MariaDB.11.LinqService,True).sql +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MariaDB.11.LinqService,True).sql @@ -22,3 +22,27 @@ FROM `Child` `ch` LIMIT @take +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @take Int32 +SET @take = 2 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT @take + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT @take + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MariaDB.11.LinqService,False).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MariaDB.11.LinqService,False).sql new file mode 100644 index 000000000000..18a6cdc98763 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MariaDB.11.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @n + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MariaDB.11.LinqService,True).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MariaDB.11.LinqService,True).sql new file mode 100644 index 000000000000..18a6cdc98763 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MariaDB.11.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @n + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MariaDB.11.LinqService,False).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MariaDB.11.LinqService,False).sql new file mode 100644 index 000000000000..cd7234747441 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MariaDB.11.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` > 3 OR `ch`.`ChildID` < 4 +LIMIT 3 + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MariaDB.11.LinqService,True).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MariaDB.11.LinqService,True).sql new file mode 100644 index 000000000000..ea74ee12aab3 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MariaDB.11.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` > 3 OR `ch`.`ChildID` < 4 +LIMIT @take + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MariaDB.11.LinqService,False).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MariaDB.11.LinqService,False).sql new file mode 100644 index 000000000000..e3995127dfd4 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MariaDB.11.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` >= 0 AND `ch`.`ChildID` <= 100 +LIMIT 3 + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MariaDB.11.LinqService,True).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MariaDB.11.LinqService,True).sql new file mode 100644 index 000000000000..47e9537fa414 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MariaDB.11.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` >= 0 AND `ch`.`ChildID` <= 100 +LIMIT @take + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MariaDB.11.LinqService,False).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MariaDB.11.LinqService,False).sql new file mode 100644 index 000000000000..bd115a145df3 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MariaDB.11.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT 3 + diff --git a/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MariaDB.11.LinqService,True).sql b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MariaDB.11.LinqService,True).sql new file mode 100644 index 000000000000..1106eab83979 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MariaDB.11.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @take + diff --git a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,False,False).sql b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,False,False).sql index 90ecea37ec08..b067e8a1b729 100644 --- a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,False,False).sql +++ b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,False,True).sql b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,False,True).sql index 90ecea37ec08..b067e8a1b729 100644 --- a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,False,True).sql +++ b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,True,False).sql b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,True,False).sql index 8889ddbc3afc..40aba5ee3cce 100644 --- a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,True,False).sql +++ b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE `testdata`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,True,True).sql b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,True,True).sql index 8889ddbc3afc..40aba5ee3cce 100644 --- a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,True,True).sql +++ b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,False,True,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE `testdata`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,False,False).sql b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,False,False).sql index 90ecea37ec08..b067e8a1b729 100644 --- a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,False,False).sql +++ b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,False,True).sql b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,False,True).sql index 90ecea37ec08..b067e8a1b729 100644 --- a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,False,True).sql +++ b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,True,False).sql b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,True,False).sql index 8889ddbc3afc..40aba5ee3cce 100644 --- a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,True,False).sql +++ b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE `testdata`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,True,True).sql b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,True,True).sql index 8889ddbc3afc..40aba5ee3cce 100644 --- a/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,True,True).sql +++ b/MariaDB.11.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MariaDB.11.LinqService,True,True,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE `testdata`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..c30147545bd2 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MariaDB.11.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `TestTable` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE `TestTable` +( + `ID` INT AUTO_INCREMENT NOT NULL, + `Field1` VARCHAR(50) NULL, + `Field2` VARCHAR(4000) NULL, + `CreatedOn` DATETIME NULL, + + CONSTRAINT `PK_TestTable` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ID`, + `t1`.`Field1`, + `t1`.`Field2`, + `t1`.`CreatedOn` +FROM + `TestTable` `t1` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE `TestTable` + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MariaDB.11.LinqService).sql index a1b97eec4745..d1efd8ea53a8 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MariaDB.11.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `TempTable` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE IF NOT EXISTS `TempTable` +( + `ID` INT NOT NULL +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +INSERT INTO `TempTable` +( + `ID` +) +SELECT + `p`.`ParentID` +FROM + `Parent` `p` + +BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql SELECT @@ -7,3 +32,8 @@ FROM `Parent` `p` INNER JOIN `TempTable` `t` ON `p`.`ParentID` = `t`.`ID` +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `TempTable` + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..ff0647328729 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MariaDB.11.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +DELETE +FROM + `xxPerson` +WHERE + `xxPerson`.`PersonID` = @ID + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE `xxPerson` + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(MariaDB.11.LinqService,100).sql b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(MariaDB.11.LinqService,100).sql index 882ecda7bbed..5d5ad84f4d2e 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(MariaDB.11.LinqService,100).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(MariaDB.11.LinqService,100).sql @@ -10,3 +10,21 @@ FROM WHERE `s`.`Id` > 3 +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `TableWithData` +WHERE + `TableWithData`.`Id` > 3 +RETURNING + `TableWithData`.`Id`, + `TableWithData`.`Value`, + `TableWithData`.`ValueStr` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `TableWithData` + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(MariaDB.11.LinqService,200).sql b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(MariaDB.11.LinqService,200).sql index 882ecda7bbed..5d5ad84f4d2e 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(MariaDB.11.LinqService,200).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(MariaDB.11.LinqService,200).sql @@ -10,3 +10,21 @@ FROM WHERE `s`.`Id` > 3 +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `TableWithData` +WHERE + `TableWithData`.`Id` > 3 +RETURNING + `TableWithData`.`Id`, + `TableWithData`.`Value`, + `TableWithData`.`ValueStr` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `TableWithData` + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(MariaDB.11.LinqService,100).sql b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(MariaDB.11.LinqService,100).sql index e7faa2c4c988..6db598691d87 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(MariaDB.11.LinqService,100).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(MariaDB.11.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE `s`.`Id` = 3 +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `TableWithData` +WHERE + `TableWithData`.`Id` = 3 +RETURNING + `TableWithData`.`Id`, + `TableWithData`.`Value`, + `TableWithData`.`ValueStr` + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(MariaDB.11.LinqService,200).sql b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(MariaDB.11.LinqService,200).sql index e7faa2c4c988..6db598691d87 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(MariaDB.11.LinqService,200).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(MariaDB.11.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE `s`.`Id` = 3 +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `TableWithData` +WHERE + `TableWithData`.`Id` = 3 +RETURNING + `TableWithData`.`Id`, + `TableWithData`.`Value`, + `TableWithData`.`ValueStr` + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(MariaDB.11.LinqService,100).sql b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(MariaDB.11.LinqService,100).sql index 882ecda7bbed..dd9b1dcaf8d2 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(MariaDB.11.LinqService,100).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(MariaDB.11.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE `s`.`Id` > 3 +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @param Int32 +SET @param = 100 + +DELETE +FROM + `TableWithData` +WHERE + `TableWithData`.`Id` > 3 +RETURNING + `TableWithData`.`Id` + @param, + `TableWithData`.`Value` + @param, + Concat(`TableWithData`.`ValueStr`, @param) + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(MariaDB.11.LinqService,200).sql b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(MariaDB.11.LinqService,200).sql index 882ecda7bbed..00dc0fe948c2 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(MariaDB.11.LinqService,200).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(MariaDB.11.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE `s`.`Id` > 3 +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @param Int32 +SET @param = 200 + +DELETE +FROM + `TableWithData` +WHERE + `TableWithData`.`Id` > 3 +RETURNING + `TableWithData`.`Id` + @param, + `TableWithData`.`Value` + @param, + Concat(`TableWithData`.`ValueStr`, @param) + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,100).sql b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,100).sql index e7faa2c4c988..237153be2e7d 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,100).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE `s`.`Id` = 3 +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @param Int32 +SET @param = 100 + +DELETE +FROM + `TableWithData` +WHERE + `TableWithData`.`Id` = 3 +RETURNING + `TableWithData`.`Id` + @param, + `TableWithData`.`Value` + @param, + Concat(`TableWithData`.`ValueStr`, @param) + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,200).sql b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,200).sql index e7faa2c4c988..dd8639608f2f 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,200).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE `s`.`Id` = 3 +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @param Int32 +SET @param = 200 + +DELETE +FROM + `TableWithData` +WHERE + `TableWithData`.`Id` = 3 +RETURNING + `TableWithData`.`Id` + @param, + `TableWithData`.`Value` + @param, + Concat(`TableWithData`.`ValueStr`, @param) + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(MariaDB.11.LinqService,100).sql b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(MariaDB.11.LinqService,100).sql index 882ecda7bbed..2496577a3208 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(MariaDB.11.LinqService,100).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(MariaDB.11.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE `s`.`Id` > 3 +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `TableWithData` +WHERE + `TableWithData`.`Id` > 3 +RETURNING + `TableWithData`.`Id` + 1, + Concat(`TableWithData`.`ValueStr`, 1) + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(MariaDB.11.LinqService,200).sql b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(MariaDB.11.LinqService,200).sql index 882ecda7bbed..2496577a3208 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(MariaDB.11.LinqService,200).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(MariaDB.11.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE `s`.`Id` > 3 +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `TableWithData` +WHERE + `TableWithData`.`Id` > 3 +RETURNING + `TableWithData`.`Id` + 1, + Concat(`TableWithData`.`ValueStr`, 1) + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,100).sql b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,100).sql index e7faa2c4c988..43e7a13177bd 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,100).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE `s`.`Id` = 3 +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `TableWithData` +WHERE + `TableWithData`.`Id` = 3 +RETURNING + `TableWithData`.`Id` + 1, + Concat(`TableWithData`.`ValueStr`, 1) + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,200).sql b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,200).sql index e7faa2c4c988..43e7a13177bd 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,200).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(MariaDB.11.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE `s`.`Id` = 3 +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `TableWithData` +WHERE + `TableWithData`.`Id` = 3 +RETURNING + `TableWithData`.`Id` + 1, + Concat(`TableWithData`.`ValueStr`, 1) + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..c0741eaf0cdf --- /dev/null +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MariaDB.11.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..4e64a02c3c79 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MariaDB.11.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +SELECT + `c_1`.`ParentID`, + @id +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = 11 + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..4e64a02c3c79 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MariaDB.11.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +SELECT + `c_1`.`ParentID`, + @id +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = 11 + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MariaDB.11.LinqService).sql index d26ca967b060..e8589e20f82c 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MariaDB.11.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) DECLARE @FirstName VarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName VarChar(4) -- String @@ -60,3 +100,32 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `p` +WHERE + `p`.`FirstName` = 'Steven' AND `p`.`LastName` = 'King' AND + `p`.`Gender` = 'M' + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE `xxPerson` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MariaDB.11.LinqService).sql index 66883503a9b4..fdbc74176a3c 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MariaDB.11.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..be7c7f9b8706 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MariaDB.11.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `xxPatient` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE `xxPatient` +( + `PersonID` INT NOT NULL, + `Diagnosis` VARCHAR(4000) NULL, + + CONSTRAINT `PK_xxPatient` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPatient` `t1` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPatient` `t1` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `xxPatient` + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MariaDB.11.LinqService).sql index 66883503a9b4..164c2bf48d4f 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MariaDB.11.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MariaDB.11.LinqService).sql index 66883503a9b4..164c2bf48d4f 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MariaDB.11.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MariaDB.11.LinqService).sql index c120d3f8ab9a..59cac8fee18f 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MariaDB.11.LinqService).sql @@ -28,6 +28,21 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = 'John' AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MariaDB.11.LinqService).sql index c120d3f8ab9a..59cac8fee18f 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MariaDB.11.LinqService).sql @@ -28,6 +28,21 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = 'John' AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MariaDB.11.LinqService).sql index 4765b6dfbe32..58bab5be7910 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MariaDB.11.LinqService).sql @@ -38,6 +38,23 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John0' + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = @p AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) DECLARE @FirstName VarChar(5) -- String @@ -69,6 +86,23 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John1' + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = @p AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(MariaDB.11.LinqService,1).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(MariaDB.11.LinqService,1).sql index 53374b8617d3..61d1c7f37c4d 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(MariaDB.11.LinqService,1).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(MariaDB.11.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Value Int32 +SET @Value = 100 +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS `TableWithData` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `TableWithData` +INSERT INTO `TableWithData` ( - `Id` INT NOT NULL, - `Value` INT NOT NULL, - `ValueStr` VARCHAR(50) NULL + `Value`, + `Id`, + `ValueStr` ) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `TableWithData` +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + `TableWithData`.`Id`, + `TableWithData`.`Value`, + `TableWithData`.`ValueStr` diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(MariaDB.11.LinqService,2).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(MariaDB.11.LinqService,2).sql index 53374b8617d3..b60969cafd7a 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(MariaDB.11.LinqService,2).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(MariaDB.11.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Value Int32 +SET @Value = 200 +DECLARE @Id Int32 +SET @Id = 2 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS `TableWithData` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `TableWithData` +INSERT INTO `TableWithData` ( - `Id` INT NOT NULL, - `Value` INT NOT NULL, - `ValueStr` VARCHAR(50) NULL + `Value`, + `Id`, + `ValueStr` ) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `TableWithData` +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + `TableWithData`.`Id`, + `TableWithData`.`Value`, + `TableWithData`.`ValueStr` diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,1).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,1).sql index 53374b8617d3..55254c3d735a 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,1).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Value Int32 +SET @Value = 100 +DECLARE @value_1 Int32 +SET @value_1 = 1 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS `TableWithData` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `TableWithData` +INSERT INTO `TableWithData` ( - `Id` INT NOT NULL, - `Value` INT NOT NULL, - `ValueStr` VARCHAR(50) NULL + `Value`, + `Id`, + `ValueStr` ) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `TableWithData` +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + `TableWithData`.`Id`, + `TableWithData`.`Value`, + `TableWithData`.`ValueStr` diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,2).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,2).sql index 53374b8617d3..e0ce2beb8355 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,2).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Value Int32 +SET @Value = 200 +DECLARE @value_1 Int32 +SET @value_1 = 2 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS `TableWithData` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `TableWithData` +INSERT INTO `TableWithData` ( - `Id` INT NOT NULL, - `Value` INT NOT NULL, - `ValueStr` VARCHAR(50) NULL + `Value`, + `Id`, + `ValueStr` ) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `TableWithData` +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + `TableWithData`.`Id`, + `TableWithData`.`Value`, + `TableWithData`.`ValueStr` diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(MariaDB.11.LinqService,100).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(MariaDB.11.LinqService,100).sql index 3b18062e8a54..00b94908e778 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(MariaDB.11.LinqService,100).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(MariaDB.11.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @param Int32 +SET @param = 100 + +INSERT INTO `DestinationTable` +( + `Id`, + `Value`, + `ValueStr` +) +SELECT + `s`.`Id` + @param, + `s`.`Value` + @param, + Concat(`s`.`ValueStr`, @param) +FROM + `TableWithData` `s` +WHERE + `s`.`Id` > 3 +RETURNING + `DestinationTable`.`Id`, + `DestinationTable`.`Value`, + `DestinationTable`.`ValueStr` + +BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql DECLARE @param Int32 SET @param = 100 diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(MariaDB.11.LinqService,200).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(MariaDB.11.LinqService,200).sql index c1c06d7cf6c0..75ec706833c0 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(MariaDB.11.LinqService,200).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(MariaDB.11.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @param Int32 +SET @param = 200 + +INSERT INTO `DestinationTable` +( + `Id`, + `Value`, + `ValueStr` +) +SELECT + `s`.`Id` + @param, + `s`.`Value` + @param, + Concat(`s`.`ValueStr`, @param) +FROM + `TableWithData` `s` +WHERE + `s`.`Id` > 3 +RETURNING + `DestinationTable`.`Id`, + `DestinationTable`.`Value`, + `DestinationTable`.`ValueStr` + +BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql DECLARE @param Int32 SET @param = 200 diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(MariaDB.11.LinqService,100).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(MariaDB.11.LinqService,100).sql index 25601d341f79..34a9793131a0 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(MariaDB.11.LinqService,100).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(MariaDB.11.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @param Int32 +SET @param = 100 + +INSERT INTO `DestinationTable` +( + `Id`, + `Value`, + `ValueStr` +) +SELECT + `s`.`Id` + @param, + `s`.`Value` + @param, + Concat(`s`.`ValueStr`, @param) +FROM + `TableWithData` `s` +WHERE + `s`.`Id` = 3 +RETURNING + `DestinationTable`.`Id`, + `DestinationTable`.`Value`, + `DestinationTable`.`ValueStr` + +BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql DECLARE @param Int32 SET @param = 100 diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(MariaDB.11.LinqService,200).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(MariaDB.11.LinqService,200).sql index d91519f492be..84a0c7124202 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(MariaDB.11.LinqService,200).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(MariaDB.11.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @param Int32 +SET @param = 200 + +INSERT INTO `DestinationTable` +( + `Id`, + `Value`, + `ValueStr` +) +SELECT + `s`.`Id` + @param, + `s`.`Value` + @param, + Concat(`s`.`ValueStr`, @param) +FROM + `TableWithData` `s` +WHERE + `s`.`Id` = 3 +RETURNING + `DestinationTable`.`Id`, + `DestinationTable`.`Value`, + `DestinationTable`.`ValueStr` + +BeforeExecute -- MariaDB.11 MariaDB.10.MySqlConnector MySql DECLARE @param Int32 SET @param = 200 diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(MariaDB.11.LinqService,1).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(MariaDB.11.LinqService,1).sql index 53374b8617d3..577c300c55d1 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(MariaDB.11.LinqService,1).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(MariaDB.11.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Value Int32 +SET @Value = 100 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS `TableWithData` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `TableWithData` +INSERT INTO `TableWithData` ( - `Id` INT NOT NULL, - `Value` INT NOT NULL, - `ValueStr` VARCHAR(50) NULL + `Id`, + `Value`, + `ValueStr` ) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `TableWithData` +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + `TableWithData`.`Id`, + `TableWithData`.`Value`, + `TableWithData`.`ValueStr` diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(MariaDB.11.LinqService,2).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(MariaDB.11.LinqService,2).sql index 53374b8617d3..23fdd247445a 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(MariaDB.11.LinqService,2).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(MariaDB.11.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Id Int32 +SET @Id = 2 +DECLARE @Value Int32 +SET @Value = 200 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS `TableWithData` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `TableWithData` +INSERT INTO `TableWithData` ( - `Id` INT NOT NULL, - `Value` INT NOT NULL, - `ValueStr` VARCHAR(50) NULL + `Id`, + `Value`, + `ValueStr` ) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `TableWithData` +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + `TableWithData`.`Id`, + `TableWithData`.`Value`, + `TableWithData`.`ValueStr` diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,1).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,1).sql index 53374b8617d3..55254c3d735a 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,1).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Value Int32 +SET @Value = 100 +DECLARE @value_1 Int32 +SET @value_1 = 1 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS `TableWithData` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `TableWithData` +INSERT INTO `TableWithData` ( - `Id` INT NOT NULL, - `Value` INT NOT NULL, - `ValueStr` VARCHAR(50) NULL + `Value`, + `Id`, + `ValueStr` ) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `TableWithData` +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + `TableWithData`.`Id`, + `TableWithData`.`Value`, + `TableWithData`.`ValueStr` diff --git a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,2).sql b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,2).sql index 53374b8617d3..e0ce2beb8355 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,2).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(MariaDB.11.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Value Int32 +SET @Value = 200 +DECLARE @value_1 Int32 +SET @value_1 = 2 +DECLARE @ValueStr VarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS `TableWithData` - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -CREATE TABLE IF NOT EXISTS `TableWithData` +INSERT INTO `TableWithData` ( - `Id` INT NOT NULL, - `Value` INT NOT NULL, - `ValueStr` VARCHAR(50) NULL + `Value`, + `Id`, + `ValueStr` ) - -BeforeExecute --- MariaDB.11 MariaDB.10.MySqlConnector MySql - -DROP TABLE IF EXISTS `TableWithData` +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + `TableWithData`.`Id`, + `TableWithData`.`Value`, + `TableWithData`.`ValueStr` diff --git a/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..8e0d12eb2dc9 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MariaDB.11.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +UPDATE + `Parent` `p1` + INNER JOIN `Parent` `p2` ON `p1`.`ParentID` = `p2`.`ParentID` +SET + `p1`.`ParentID` = `p2`.`ParentID` +WHERE + `p1`.`ParentID` < 3 + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..a354fbd5344a --- /dev/null +++ b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MariaDB.11.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + `Parent` `p` +SET + `p`.`ParentID` = `p`.`ParentID` + 1 +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @p + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..a354fbd5344a --- /dev/null +++ b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MariaDB.11.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + `Parent` `p` +SET + `p`.`ParentID` = `p`.`ParentID` + 1 +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @p + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..0df5313fddef --- /dev/null +++ b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MariaDB.11.LinqService).sql @@ -0,0 +1,53 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +UPDATE + `Child` `c_1` + LEFT JOIN `Parent` `a_Parent` ON `c_1`.`ParentID` = `a_Parent`.`ParentID` +SET + `c_1`.`ChildID` = `c_1`.`ChildID` + 1 +WHERE + `c_1`.`ChildID` = @id AND `a_Parent`.`Value1` = 1 + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @p + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..1e6bd8344c77 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MariaDB.11.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +INSERT INTO `Child` +( + `ChildID`, + `ParentID` +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +UPDATE + `Parent` `a_Parent`, + `Child` `child_1` +SET + `a_Parent`.`Value1` = 5 +WHERE + `child_1`.`ChildID` = 10000 AND `child_1`.`ParentID` = `a_Parent`.`ParentID` + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..1e6bd8344c77 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MariaDB.11.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +INSERT INTO `Child` +( + `ChildID`, + `ParentID` +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +UPDATE + `Parent` `a_Parent`, + `Child` `child_1` +SET + `a_Parent`.`Value1` = 5 +WHERE + `child_1`.`ChildID` = 10000 AND `child_1`.`ParentID` = `a_Parent`.`ParentID` + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MariaDB.11.LinqService).sql new file mode 100644 index 000000000000..7ea0612e85c3 --- /dev/null +++ b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MariaDB.11.LinqService).sql @@ -0,0 +1,107 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Int32 +SET @ID = 1 + +UPDATE + `xxPerson` `t1` +SET + `t1`.`FirstName` = @FirstName, + `t1`.`LastName` = @LastName, + `t1`.`MiddleName` = @MiddleName, + `t1`.`Gender` = @Gender +WHERE + `t1`.`PersonID` = @ID + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +DROP TABLE `xxPerson` + diff --git a/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MariaDB.11.LinqService).sql b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MariaDB.11.LinqService).sql index 10de8ea9d24c..474aa4e39d43 100644 --- a/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MariaDB.11.LinqService).sql +++ b/MariaDB.11.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MariaDB.11.LinqService).sql @@ -34,3 +34,60 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `t1`.`PersonID`, + `t1`.`Gender`, + `t1`.`FirstName`, + `t1`.`MiddleName`, + `t1`.`LastName` +FROM + `Person` `t1` +WHERE + `t1`.`PersonID` = @id +LIMIT 1 + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @Gender String(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName VarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName VarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName VarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int32 +SET @ID = 5 + +UPDATE + `Person` `t1` +SET + `t1`.`Gender` = @Gender, + `t1`.`FirstName` = @Name_FirstName, + `t1`.`MiddleName` = @Name_MiddleName, + `t1`.`LastName` = @Name_LastName +WHERE + `t1`.`PersonID` = @ID + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `t1`.`PersonID`, + `t1`.`Gender`, + `t1`.`FirstName`, + `t1`.`MiddleName`, + `t1`.`LastName` +FROM + `Person` `t1` +WHERE + `t1`.`PersonID` = @id +LIMIT 1 + diff --git a/MariaDB.11/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MariaDB.11).sql b/MariaDB.11/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MariaDB.11).sql new file mode 100644 index 000000000000..b47216ad3f8f --- /dev/null +++ b/MariaDB.11/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MariaDB.11).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MariaDB.11/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MariaDB.11).sql b/MariaDB.11/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MariaDB.11).sql new file mode 100644 index 000000000000..0d42eda41c0d --- /dev/null +++ b/MariaDB.11/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MariaDB.11).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MariaDB.11/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MariaDB.11).sql b/MariaDB.11/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MariaDB.11).sql new file mode 100644 index 000000000000..0d42eda41c0d --- /dev/null +++ b/MariaDB.11/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MariaDB.11).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MariaDB.11 MariaDB.10.MySqlConnector MySql (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + From 97a1257ec7a6a5c1c82f5853f2cfa75e72e5df8c Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:50:19 +0000 Subject: [PATCH 15/40] [Windows / Access MDB (Jet/ODBC)] baselines --- ...All4Async(Access.Jet.Odbc.LinqService).sql | 10 + ...pBy2Async(Access.Jet.Odbc.LinqService).sql | 31 +++ ...able1Test(Access.Jet.Odbc.LinqService).sql | 9 + ...able2Test(Access.Jet.Odbc.LinqService).sql | 11 + ...Cast1Test(Access.Jet.Odbc.LinqService).sql | 9 + ...Cast2Test(Access.Jet.Odbc.LinqService).sql | 11 + ...AsyncTest(Access.Jet.Odbc.LinqService).sql | 12 + ...AsyncTest(Access.Jet.Odbc.LinqService).sql | 14 ++ ...eSkipTest(Access.Jet.Odbc.LinqService).sql | 11 + ...OrDefault(Access.Jet.Odbc.LinqService).sql | 19 ++ ...AsyncTest(Access.Jet.Odbc.LinqService).sql | 21 ++ ...AsyncTest(Access.Jet.Odbc.LinqService).sql | 21 ++ ...TestAsync(Access.Jet.Odbc.LinqService).sql | 24 ++ ...estAsync2(Access.Jet.Odbc.LinqService).sql | 24 ++ ...syncdTest(Access.Jet.Odbc.LinqService).sql | 15 ++ ...est3Async(Access.Jet.Odbc.LinqService).sql | 26 +++ ...TestAsync(Access.Jet.Odbc.LinqService).sql | 24 ++ ...TestAsync(Access.Jet.Odbc.LinqService).sql | 24 ++ ...estAsync2(Access.Jet.Odbc.LinqService).sql | 24 ++ ...estAsync1(Access.Jet.Odbc.LinqService).sql | 26 +++ ...estAsync2(Access.Jet.Odbc.LinqService).sql | 26 +++ ...TestAsync(Access.Jet.Odbc.LinqService).sql | 24 ++ ...estAsync2(Access.Jet.Odbc.LinqService).sql | 24 ++ ...cateAsync(Access.Jet.Odbc.LinqService).sql | 168 +------------- ...cateAsync(Access.Jet.Odbc.LinqService).sql | 168 +------------- ...cateAsync(Access.Jet.Odbc.LinqService).sql | 171 ++------------ ...cateAsync(Access.Jet.Odbc.LinqService).sql | 171 ++------------ ...cateAsync(Access.Jet.Odbc.LinqService).sql | 168 +------------- ...ctorAsync(Access.Jet.Odbc.LinqService).sql | 168 +------------- ...ctorAsync(Access.Jet.Odbc.LinqService).sql | 168 +------------- ...cateAsync(Access.Jet.Odbc.LinqService).sql | 171 ++------------ ...cateAsync(Access.Jet.Odbc.LinqService).sql | 171 ++------------ ...cat1Async(Access.Jet.Odbc.LinqService).sql | 19 ++ ...mentAsync(Access.Jet.Odbc.LinqService).sql | 97 ++++++++ ...eredAsync(Access.Jet.Odbc.LinqService).sql | 80 +++++++ ...unt1Async(Access.Jet.Odbc.LinqService).sql | 8 + ...unt2Async(Access.Jet.Odbc.LinqService).sql | 10 + ...Max1Async(Access.Jet.Odbc.LinqService).sql | 16 ++ ...Issue4602(Access.Jet.Odbc.LinqService).sql | 48 +--- ...057_Async(Access.Jet.Odbc.LinqService).sql | 29 +++ ...ansaction(Access.Jet.Odbc.LinqService).sql | 29 +++ ...sionAsync(Access.Jet.Odbc.LinqService).sql | 25 ++ ...ast1Async(Access.Jet.Odbc.LinqService).sql | 11 + ...st18Async(Access.Jet.Odbc.LinqService).sql | 14 ++ ...ter1Async(Access.Jet.Odbc.LinqService).sql | 6 + ...e3132Test(Access.Jet.Odbc.LinqService).sql | 213 ++++++++++++++++++ ...ync(Access.Jet.Odbc.LinqService,False).sql | 13 ++ ...sync(Access.Jet.Odbc.LinqService,True).sql | 13 ++ ...ync(Access.Jet.Odbc.LinqService,False).sql | 13 ++ ...sync(Access.Jet.Odbc.LinqService,True).sql | 13 ++ ...kip1Async(Access.Jet.Odbc.LinqService).sql | 80 +------ ...ync(Access.Jet.Odbc.LinqService,False).sql | 18 ++ ...sync(Access.Jet.Odbc.LinqService,True).sql | 18 ++ ...ync(Access.Jet.Odbc.LinqService,False).sql | 9 + ...sync(Access.Jet.Odbc.LinqService,True).sql | 9 + ...ync(Access.Jet.Odbc.LinqService,False).sql | 11 + ...sync(Access.Jet.Odbc.LinqService,True).sql | 11 + ...ync(Access.Jet.Odbc.LinqService,False).sql | 11 + ...sync(Access.Jet.Odbc.LinqService,True).sql | 11 + ...ync(Access.Jet.Odbc.LinqService,False).sql | 9 + ...sync(Access.Jet.Odbc.LinqService,True).sql | 9 + ...et.Odbc.LinqService,False,False,False).sql | 16 ++ ...Jet.Odbc.LinqService,False,False,True).sql | 16 ++ ...Jet.Odbc.LinqService,False,True,False).sql | 16 ++ ....Jet.Odbc.LinqService,False,True,True).sql | 16 ++ ...Jet.Odbc.LinqService,True,False,False).sql | 16 ++ ....Jet.Odbc.LinqService,True,False,True).sql | 16 ++ ....Jet.Odbc.LinqService,True,True,False).sql | 16 ++ ...s.Jet.Odbc.LinqService,True,True,True).sql | 16 ++ ...ble1Async(Access.Jet.Odbc.LinqService).sql | 34 +++ ...ableAsync(Access.Jet.Odbc.LinqService).sql | 30 +++ ...NameAsync(Access.Jet.Odbc.LinqService).sql | 88 ++++++++ ...ert2Async(Access.Jet.Odbc.LinqService).sql | 44 ++++ ...ert3Async(Access.Jet.Odbc.LinqService).sql | 46 ++++ ...ert4Async(Access.Jet.Odbc.LinqService).sql | 46 ++++ ...NameAsync(Access.Jet.Odbc.LinqService).sql | 69 ++++++ ...ace1Async(Access.Jet.Odbc.LinqService).sql | 73 ++++++ ...NameAsync(Access.Jet.Odbc.LinqService).sql | 129 +++++++++++ ...ate3Async(Access.Jet.Odbc.LinqService).sql | 71 ++++++ ...te3xAsync(Access.Jet.Odbc.LinqService).sql | 71 ++++++ ...ity1Async(Access.Jet.Odbc.LinqService).sql | 14 ++ ...ity2Async(Access.Jet.Odbc.LinqService).sql | 14 ++ ...ity4Async(Access.Jet.Odbc.LinqService).sql | 32 +++ ...te12Async(Access.Jet.Odbc.LinqService).sql | 11 + ...ate1Async(Access.Jet.Odbc.LinqService).sql | 54 +++++ ...ate2Async(Access.Jet.Odbc.LinqService).sql | 54 +++++ ...ate4Async(Access.Jet.Odbc.LinqService).sql | 53 +++++ ...ion1Async(Access.Jet.Odbc.LinqService).sql | 39 ++++ ...1AsyncOld(Access.Jet.Odbc.LinqService).sql | 39 ++++ ...NameAsync(Access.Jet.Odbc.LinqService).sql | 105 +++++++++ ...lex1Async(Access.Jet.Odbc.LinqService).sql | 55 +++++ ....Linq.AsyncTests.Test(Access.Jet.Odbc).sql | 18 ++ ...Linq.AsyncTests.Test1(Access.Jet.Odbc).sql | 9 + ...syncTests.TestForEach(Access.Jet.Odbc).sql | 9 + ...ll4Async(Access.Jet.OleDb.LinqService).sql | 10 + ...By2Async(Access.Jet.OleDb.LinqService).sql | 31 +++ ...ble1Test(Access.Jet.OleDb.LinqService).sql | 9 + ...ble2Test(Access.Jet.OleDb.LinqService).sql | 11 + ...ast1Test(Access.Jet.OleDb.LinqService).sql | 9 + ...ast2Test(Access.Jet.OleDb.LinqService).sql | 11 + ...syncTest(Access.Jet.OleDb.LinqService).sql | 12 + ...syncTest(Access.Jet.OleDb.LinqService).sql | 14 ++ ...SkipTest(Access.Jet.OleDb.LinqService).sql | 11 + ...rDefault(Access.Jet.OleDb.LinqService).sql | 19 ++ ...syncTest(Access.Jet.OleDb.LinqService).sql | 21 ++ ...syncTest(Access.Jet.OleDb.LinqService).sql | 21 ++ ...estAsync(Access.Jet.OleDb.LinqService).sql | 24 ++ ...stAsync2(Access.Jet.OleDb.LinqService).sql | 24 ++ ...yncdTest(Access.Jet.OleDb.LinqService).sql | 15 ++ ...st3Async(Access.Jet.OleDb.LinqService).sql | 26 +++ ...estAsync(Access.Jet.OleDb.LinqService).sql | 24 ++ ...estAsync(Access.Jet.OleDb.LinqService).sql | 24 ++ ...stAsync2(Access.Jet.OleDb.LinqService).sql | 24 ++ ...stAsync1(Access.Jet.OleDb.LinqService).sql | 26 +++ ...stAsync2(Access.Jet.OleDb.LinqService).sql | 26 +++ ...estAsync(Access.Jet.OleDb.LinqService).sql | 24 ++ ...stAsync2(Access.Jet.OleDb.LinqService).sql | 24 ++ ...ateAsync(Access.Jet.OleDb.LinqService).sql | 168 +------------- ...ateAsync(Access.Jet.OleDb.LinqService).sql | 168 +------------- ...ateAsync(Access.Jet.OleDb.LinqService).sql | 171 ++------------ ...ateAsync(Access.Jet.OleDb.LinqService).sql | 171 ++------------ ...ateAsync(Access.Jet.OleDb.LinqService).sql | 168 +------------- ...torAsync(Access.Jet.OleDb.LinqService).sql | 168 +------------- ...torAsync(Access.Jet.OleDb.LinqService).sql | 168 +------------- ...ateAsync(Access.Jet.OleDb.LinqService).sql | 171 ++------------ ...ateAsync(Access.Jet.OleDb.LinqService).sql | 171 ++------------ ...at1Async(Access.Jet.OleDb.LinqService).sql | 19 ++ ...entAsync(Access.Jet.OleDb.LinqService).sql | 97 ++++++++ ...redAsync(Access.Jet.OleDb.LinqService).sql | 80 +++++++ ...nt1Async(Access.Jet.OleDb.LinqService).sql | 8 + ...nt2Async(Access.Jet.OleDb.LinqService).sql | 10 + ...ax1Async(Access.Jet.OleDb.LinqService).sql | 16 ++ ...ssue4602(Access.Jet.OleDb.LinqService).sql | 48 +--- ...57_Async(Access.Jet.OleDb.LinqService).sql | 29 +++ ...nsaction(Access.Jet.OleDb.LinqService).sql | 29 +++ ...ionAsync(Access.Jet.OleDb.LinqService).sql | 25 ++ ...st1Async(Access.Jet.OleDb.LinqService).sql | 11 + ...t18Async(Access.Jet.OleDb.LinqService).sql | 14 ++ ...er1Async(Access.Jet.OleDb.LinqService).sql | 6 + ...3132Test(Access.Jet.OleDb.LinqService).sql | 213 ++++++++++++++++++ ...nc(Access.Jet.OleDb.LinqService,False).sql | 13 ++ ...ync(Access.Jet.OleDb.LinqService,True).sql | 13 ++ ...nc(Access.Jet.OleDb.LinqService,False).sql | 13 ++ ...ync(Access.Jet.OleDb.LinqService,True).sql | 13 ++ ...ip1Async(Access.Jet.OleDb.LinqService).sql | 80 +------ ...nc(Access.Jet.OleDb.LinqService,False).sql | 18 ++ ...ync(Access.Jet.OleDb.LinqService,True).sql | 18 ++ ...nc(Access.Jet.OleDb.LinqService,False).sql | 9 + ...ync(Access.Jet.OleDb.LinqService,True).sql | 9 + ...nc(Access.Jet.OleDb.LinqService,False).sql | 11 + ...ync(Access.Jet.OleDb.LinqService,True).sql | 11 + ...nc(Access.Jet.OleDb.LinqService,False).sql | 11 + ...ync(Access.Jet.OleDb.LinqService,True).sql | 11 + ...nc(Access.Jet.OleDb.LinqService,False).sql | 9 + ...ync(Access.Jet.OleDb.LinqService,True).sql | 9 + ...t.OleDb.LinqService,False,False,False).sql | 16 ++ ...et.OleDb.LinqService,False,False,True).sql | 16 ++ ...et.OleDb.LinqService,False,True,False).sql | 16 ++ ...Jet.OleDb.LinqService,False,True,True).sql | 16 ++ ...et.OleDb.LinqService,True,False,False).sql | 16 ++ ...Jet.OleDb.LinqService,True,False,True).sql | 16 ++ ...Jet.OleDb.LinqService,True,True,False).sql | 16 ++ ....Jet.OleDb.LinqService,True,True,True).sql | 16 ++ ...le1Async(Access.Jet.OleDb.LinqService).sql | 34 +++ ...bleAsync(Access.Jet.OleDb.LinqService).sql | 30 +++ ...ameAsync(Access.Jet.OleDb.LinqService).sql | 88 ++++++++ ...rt2Async(Access.Jet.OleDb.LinqService).sql | 44 ++++ ...rt3Async(Access.Jet.OleDb.LinqService).sql | 46 ++++ ...rt4Async(Access.Jet.OleDb.LinqService).sql | 46 ++++ ...ameAsync(Access.Jet.OleDb.LinqService).sql | 69 ++++++ ...ce1Async(Access.Jet.OleDb.LinqService).sql | 73 ++++++ ...ameAsync(Access.Jet.OleDb.LinqService).sql | 129 +++++++++++ ...te3Async(Access.Jet.OleDb.LinqService).sql | 71 ++++++ ...e3xAsync(Access.Jet.OleDb.LinqService).sql | 71 ++++++ ...ty1Async(Access.Jet.OleDb.LinqService).sql | 14 ++ ...ty2Async(Access.Jet.OleDb.LinqService).sql | 14 ++ ...ty4Async(Access.Jet.OleDb.LinqService).sql | 32 +++ ...e12Async(Access.Jet.OleDb.LinqService).sql | 11 + ...te1Async(Access.Jet.OleDb.LinqService).sql | 54 +++++ ...te2Async(Access.Jet.OleDb.LinqService).sql | 54 +++++ ...te4Async(Access.Jet.OleDb.LinqService).sql | 53 +++++ ...on1Async(Access.Jet.OleDb.LinqService).sql | 39 ++++ ...AsyncOld(Access.Jet.OleDb.LinqService).sql | 39 ++++ ...ameAsync(Access.Jet.OleDb.LinqService).sql | 105 +++++++++ ...ex1Async(Access.Jet.OleDb.LinqService).sql | 55 +++++ ...Linq.AsyncTests.Test(Access.Jet.OleDb).sql | 18 ++ ...inq.AsyncTests.Test1(Access.Jet.OleDb).sql | 9 + ...yncTests.TestForEach(Access.Jet.OleDb).sql | 9 + 188 files changed, 5238 insertions(+), 3066 deletions(-) create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.Odbc.LinqService,False).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.Odbc.LinqService,True).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.Odbc.LinqService,False).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.Odbc.LinqService,True).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.Odbc.LinqService,False).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.Odbc.LinqService,True).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.Odbc.LinqService,False).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.Odbc.LinqService,True).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.Odbc.LinqService,False).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.Odbc.LinqService,True).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.Odbc.LinqService,False).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.Odbc.LinqService,True).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Jet.Odbc.LinqService).sql create mode 100644 Access.Jet.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Jet.Odbc).sql create mode 100644 Access.Jet.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Jet.Odbc).sql create mode 100644 Access.Jet.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Jet.Odbc).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.OleDb.LinqService,False).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.OleDb.LinqService,True).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.OleDb.LinqService,False).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.OleDb.LinqService,True).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.OleDb.LinqService,False).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.OleDb.LinqService,True).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.OleDb.LinqService,False).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.OleDb.LinqService,True).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.OleDb.LinqService,False).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.OleDb.LinqService,True).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.OleDb.LinqService,False).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.OleDb.LinqService,True).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Jet.OleDb.LinqService).sql create mode 100644 Access.Jet.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Jet.OleDb).sql create mode 100644 Access.Jet.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Jet.OleDb).sql create mode 100644 Access.Jet.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Jet.OleDb).sql diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..f735dfef13ac --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) = 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] <= 3 + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..3cfee2f9e867 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,31 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON ([t1].[ParentID] = [a_Parent1].[ParentID]) + ) [m_1], + [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON ([d].[ParentID] = [a_Parent1_1].[ParentID]) +WHERE + [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON ([t1].[ParentID] = [a_Parent1].[ParentID]) +GROUP BY + [a_Parent1].[ParentID] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..144052128612 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..04be27cda0e3 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..144052128612 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..04be27cda0e3 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..9186f16ad981 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + COUNT(*) > 0 +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..8064b1025740 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 1 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Jet.Odbc.LinqService).sql index acd02faa0210..198a563fdfeb 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Jet.Odbc.LinqService).sql @@ -9,3 +9,14 @@ FROM ORDER BY [t1].[ParentID] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..ca0ef9985643 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p Int -- Int32 +SET @p = 2 +DECLARE @p Int -- Int32 +SET @p = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP 1 + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (?, ?, ?) OR [o].[ParentID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..629a28785d6e --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..629a28785d6e --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..e25df861261c --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..e25df861261c --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..67f555ba4986 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = ? +ORDER BY + [x].[ParentID] DESC + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..437cbb18de95 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 2 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..e25df861261c --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..632ba1fc7eac --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..632ba1fc7eac --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..c0a325b59a1a --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..c0a325b59a1a --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..0345ae1d0c3e --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..0345ae1d0c3e --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Jet.Odbc.LinqService).sql index 2db3fa3c77bc..ab8474b52bff 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Jet.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) > 0 +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = ? diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Jet.Odbc.LinqService).sql index 2db3fa3c77bc..488f73c28a2d 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Jet.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = ? diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Jet.Odbc.LinqService).sql index 2db3fa3c77bc..87ef964a7153 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Jet.Odbc.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 1 + CVar(?), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(?) diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Jet.Odbc.LinqService).sql index 2db3fa3c77bc..87ef964a7153 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Jet.Odbc.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 1 + CVar(?), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(?) diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Jet.Odbc.LinqService).sql index 2db3fa3c77bc..488f73c28a2d 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Jet.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = ? diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Jet.Odbc.LinqService).sql index 2db3fa3c77bc..58ff0b50ed00 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Jet.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > ? diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Jet.Odbc.LinqService).sql index 2db3fa3c77bc..ab9eb3d75852 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Jet.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > ? diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Jet.Odbc.LinqService).sql index 2db3fa3c77bc..d410990b48dc 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Jet.Odbc.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 2 + CVar(?), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(?) diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Jet.Odbc.LinqService).sql index 2db3fa3c77bc..d410990b48dc 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Jet.Odbc.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 2 + CVar(?), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(?) diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..796b394d35e0 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Jet.Odbc.LinqService).sql index 0913a45b27e3..a1457efb828b 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Jet.Odbc.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + ?, + ?, + ? +) + +BeforeExecute -- Access.Jet.Odbc AccessODBC SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] [obj] +SET + [obj].[Stamp] = [obj].[Stamp] + 1, + [obj].[Value] = ? +WHERE + [obj].[Id] = ? AND [obj].[Stamp] = ? + BeforeExecute -- Access.Jet.Odbc AccessODBC @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] [obj] +SET + [obj].[Stamp] = [obj].[Stamp] + 1, + [obj].[Value] = ? +WHERE + [obj].[Id] = ? AND [obj].[Stamp] = ? + BeforeExecute -- Access.Jet.Odbc AccessODBC @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] [obj] +SET + [obj].[Stamp] = [obj].[Stamp] + 1, + [obj].[Value] = ? +WHERE + [obj].[Id] = ? AND [obj].[Stamp] = ? + BeforeExecute -- Access.Jet.Odbc AccessODBC @@ -38,6 +111,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = ? AND [obj].[Stamp] = ? + BeforeExecute -- Access.Jet.Odbc AccessODBC @@ -48,6 +133,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = ? AND [obj].[Stamp] = ? + BeforeExecute -- Access.Jet.Odbc AccessODBC diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Jet.Odbc.LinqService).sql index 0d8f3a37a52c..f9123e5e78e4 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Jet.Odbc.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + ?, + ?, + ? +) + +BeforeExecute -- Access.Jet.Odbc AccessODBC SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] [r] +SET + [r].[Stamp] = [r].[Stamp] + 1, + [r].[Value] = ? +WHERE + [r].[Id] = 2 AND [r].[Id] = ? AND [r].[Stamp] = ? + BeforeExecute -- Access.Jet.Odbc AccessODBC @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] [r] +SET + [r].[Stamp] = [r].[Stamp] + 1, + [r].[Value] = ? +WHERE + [r].[Id] = 1 AND [r].[Id] = ? AND [r].[Stamp] = ? + BeforeExecute -- Access.Jet.Odbc AccessODBC @@ -28,6 +84,18 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = ? AND [r].[Stamp] = ? + BeforeExecute -- Access.Jet.Odbc AccessODBC @@ -38,6 +106,18 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = ? AND [r].[Stamp] = ? + BeforeExecute -- Access.Jet.Odbc AccessODBC diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..fd2d1abc5fb8 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..c029eac0757d --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..5b1f2ba30450 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON ([c_1].[ParentID] = [a_Parent].[ParentID]) + WHERE + [a_Parent].[ParentID] = [t1].[ParentID] + )) +FROM + [Parent] [t1] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Jet.Odbc.LinqService).sql index ed7194421edc..8a107297610f 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Jet.Odbc.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [DynamicParent] - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -CREATE TABLE [DynamicParent] -( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [DynamicChild] - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -CREATE TABLE [DynamicChild] -( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [DynamicChild] - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [DynamicParent] +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON ([it].[ID] = [a_Child].[ParentID]) +WHERE + [a_Child].[ID] = 123 diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Jet.Odbc.LinqService).sql index 9693ad69eb0a..a31d03911bc8 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Jet.Odbc.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP 1 + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON ([m_1].[ParentID] = [d].[ParentID]) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(Unspecified) BeforeExecute -- Access.Jet.Odbc AccessODBC (asynchronously) diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Jet.Odbc.LinqService).sql index 0b32d5469200..2f82a25e62dd 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Jet.Odbc.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP 1 + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON ([m_1].[ParentID] = [d].[ParentID]) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- Access.Jet.Odbc AccessODBC (asynchronously) diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..bb94e13f5d76 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON ([a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID]) + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..d08ae36231fb --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..d4b494627545 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = 'F' + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..2be763c68950 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + 1 + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..d3f9f9929ec6 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.Odbc.LinqService,False).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..99981d3f9518 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.Odbc.LinqService,False).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.Odbc.LinqService,True).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..99981d3f9518 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.Odbc.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.Odbc.LinqService,False).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..99981d3f9518 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.Odbc.LinqService,False).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.Odbc.LinqService,True).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..99981d3f9518 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.Odbc.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Jet.Odbc.LinqService).sql index 9592e7d2a1f9..90f6b48c1f61 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Jet.Odbc.LinqService).sql @@ -1,74 +1,10 @@ BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [TakeSkipClass] - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -CREATE TABLE [TakeSkipClass] -( - [Value] VarChar(10) NULL -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Jet.Odbc AccessODBC - -DROP TABLE [TakeSkipClass] +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.Odbc.LinqService,False).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.Odbc.LinqService,False).sql index 1ed700c66af8..d37604c8652c 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.Odbc.LinqService,False).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.Odbc.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP 3 FROM [Child] [ch] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.Odbc.LinqService,True).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.Odbc.LinqService,True).sql index 1ed700c66af8..d37604c8652c 100644 --- a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.Odbc.LinqService,True).sql +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.Odbc.LinqService,True).sql @@ -16,3 +16,21 @@ SELECT TOP 3 FROM [Child] [ch] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.Odbc.LinqService,False).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..2e630c6484d8 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.Odbc.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 1 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.Odbc.LinqService,True).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..2e630c6484d8 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.Odbc.LinqService,True).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 1 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.Odbc.LinqService,False).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..a950640f329a --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.Odbc.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.Odbc.LinqService,True).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..a950640f329a --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.Odbc.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.Odbc.LinqService,False).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..c7802f9fa9e2 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.Odbc.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.Odbc.LinqService,True).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..c7802f9fa9e2 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.Odbc.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.Odbc.LinqService,False).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..8d81cf789dcc --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.Odbc.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.Odbc.LinqService,True).sql b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..8d81cf789dcc --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.Odbc.LinqService,True).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,False,False).sql b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,False,False).sql index f1541489468c..215f989bba79 100644 --- a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,False,False).sql +++ b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,False,True).sql b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,False,True).sql index f1541489468c..215f989bba79 100644 --- a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,False,True).sql +++ b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,True,False).sql b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,True,False).sql index f1541489468c..dd48b10e3a94 100644 --- a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,True,False).sql +++ b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Database\TestData.ODBC.mdb].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,True,True).sql b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,True,True).sql index f1541489468c..dd48b10e3a94 100644 --- a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,True,True).sql +++ b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,False,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Database\TestData.ODBC.mdb].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,False,False).sql b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,False,False).sql index f1541489468c..215f989bba79 100644 --- a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,False,False).sql +++ b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,False,True).sql b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,False,True).sql index f1541489468c..215f989bba79 100644 --- a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,False,True).sql +++ b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,True,False).sql b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,True,False).sql index f1541489468c..dd48b10e3a94 100644 --- a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,True,False).sql +++ b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Database\TestData.ODBC.mdb].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,True,True).sql b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,True,True).sql index f1541489468c..dd48b10e3a94 100644 --- a/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,True,True).sql +++ b/Access.Jet.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.Odbc.LinqService,True,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Database\TestData.ODBC.mdb].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..9f639de02c2e --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [TestTable] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(255) NULL, + [CreatedOn] DateTime NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [TestTable] + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Jet.Odbc.LinqService).sql index a9b511ae2a8c..ab1a54bca7a8 100644 --- a/Access.Jet.Odbc.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Jet.Odbc.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [TempTable] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [TempTable] +( + [ID] Int NOT NULL +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- Access.Jet.Odbc AccessODBC SELECT @@ -7,3 +32,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON ([p].[ParentID] = [t].[ID]) +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [TempTable] + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..0cdbadf8081e --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,88 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + ?, + ?, + ?, + ? +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..71d259b8cf1f --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + ? +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..06f40da4472c --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + ? +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..06f40da4472c --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + ? +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Jet.Odbc.LinqService).sql index ff19f4b63012..3e8380a08ea9 100644 --- a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Jet.Odbc.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + ?, + ?, + ?, + ? +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) DECLARE @FirstName NVarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName NVarChar(4) -- String @@ -60,3 +100,32 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = 'Steven' AND [p].[LastName] = 'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Jet.Odbc.LinqService).sql index 34715232402c..36c2141691f0 100644 --- a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Jet.Odbc.LinqService).sql @@ -54,3 +54,76 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc0' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..7ec98b061e45 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,129 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPatient] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(255) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO [xxPatient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO [xxPatient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPatient] + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Jet.Odbc.LinqService).sql index 34715232402c..647b78c8ebaf 100644 --- a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Jet.Odbc.LinqService).sql @@ -54,3 +54,74 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + ?), NULL) +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + ?, + 'abc' +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + ?), NULL) +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + ?), NULL) +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Jet.Odbc.LinqService).sql index 34715232402c..aee50a4046e5 100644 --- a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Jet.Odbc.LinqService).sql @@ -54,3 +54,74 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + ?), NULL) +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + ?, + 'abc' +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + ?), NULL) +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + ?), NULL) +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Jet.Odbc.LinqService).sql index e7f060c9941c..692232bdb092 100644 --- a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Jet.Odbc.LinqService).sql @@ -27,6 +27,20 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Jet.Odbc AccessODBC diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Jet.Odbc.LinqService).sql index e7f060c9941c..692232bdb092 100644 --- a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Jet.Odbc.LinqService).sql @@ -27,6 +27,20 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Jet.Odbc AccessODBC diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Jet.Odbc.LinqService).sql index 1705da656470..642f8c1b717a 100644 --- a/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Jet.Odbc.LinqService).sql @@ -37,6 +37,22 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John0' + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = ? AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Jet.Odbc AccessODBC (asynchronously) DECLARE @FirstName NVarChar(5) -- String @@ -68,6 +84,22 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John1' + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = ? AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Jet.Odbc AccessODBC diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..e037d6097ce7 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +UPDATE + [Parent] [p1] + INNER JOIN [Parent] [p2] ON ([p1].[ParentID] = [p2].[ParentID]) +SET + [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..79412f83d1f2 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] [p] +SET + [p].[ParentID] = [p].[ParentID] + 1 +WHERE + [p].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..79412f83d1f2 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] [p] +SET + [p].[ParentID] = [p].[ParentID] + 1 +WHERE + [p].[ParentID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..9192436184e3 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,53 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + ? +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON ([c_1].[ParentID] = [a_Parent].[ParentID]) +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +WHERE + [c_1].[ChildID] = ? AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = ? + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..1fb897776fac --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +UPDATE + [Parent] [a_Parent], + [Child] [child_1] +SET + [a_Parent].[Value1] = 5 +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [a_Parent].[ParentID] + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..1fb897776fac --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +UPDATE + [Parent] [a_Parent], + [Child] [child_1] +SET + [a_Parent].[Value1] = 5 +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [a_Parent].[ParentID] + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Jet.Odbc.LinqService).sql new file mode 100644 index 000000000000..a668178fe878 --- /dev/null +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Jet.Odbc.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + ?, + ?, + ?, + ? +) + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] [t1] +SET + [t1].[FirstName] = ?, + [t1].[LastName] = ?, + [t1].[MiddleName] = ?, + [t1].[Gender] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Jet.Odbc.LinqService).sql b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Jet.Odbc.LinqService).sql index 270bf9fd77d2..e37083f71717 100644 --- a/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Jet.Odbc.LinqService).sql +++ b/Access.Jet.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Jet.Odbc.LinqService).sql @@ -54,3 +54,58 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP 1 + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName NVarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName NVarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] [t1] +SET + [t1].[Gender] = ?, + [t1].[FirstName] = ?, + [t1].[MiddleName] = ?, + [t1].[LastName] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP 1 + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = ? + diff --git a/Access.Jet.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Jet.Odbc).sql b/Access.Jet.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Jet.Odbc).sql new file mode 100644 index 000000000000..1547b1464cb2 --- /dev/null +++ b/Access.Jet.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Jet.Odbc).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Jet.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Jet.Odbc).sql b/Access.Jet.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Jet.Odbc).sql new file mode 100644 index 000000000000..144052128612 --- /dev/null +++ b/Access.Jet.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Jet.Odbc).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Jet.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Jet.Odbc).sql b/Access.Jet.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Jet.Odbc).sql new file mode 100644 index 000000000000..144052128612 --- /dev/null +++ b/Access.Jet.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Jet.Odbc).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..48ac22fd2adb --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) = 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] <= 3 + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..f3f634188980 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,31 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON ([t1].[ParentID] = [a_Parent1].[ParentID]) + ) [m_1], + [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON ([d].[ParentID] = [a_Parent1_1].[ParentID]) +WHERE + [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON ([t1].[ParentID] = [a_Parent1].[ParentID]) +GROUP BY + [a_Parent1].[ParentID] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..b1a5aa6793e3 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..d6353bc532bc --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..b1a5aa6793e3 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..d6353bc532bc --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..5a22b40ee082 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +SELECT + COUNT(*) > 0 +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @ID + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..734201dbd688 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 1 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Jet.OleDb.LinqService).sql index 4f90e668c1a6..c4bbc6769cd3 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Jet.OleDb.LinqService).sql @@ -9,3 +9,14 @@ FROM ORDER BY [t1].[ParentID] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..0cff5b91e47e --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer -- Int32 +SET @p_2 = 3 +DECLARE @param Integer -- Int32 +SET @param = 4 + +SELECT TOP 1 + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..60e28e9bfdb8 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..60e28e9bfdb8 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..6fc55de00834 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..6fc55de00834 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..c4c5ae5d4fe9 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..88936e7016f3 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT TOP 2 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..6fc55de00834 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..c8a7adcab8a2 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..c8a7adcab8a2 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..a85d246dc29f --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..a85d246dc29f --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..d2da584b8977 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..d2da584b8977 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Jet.OleDb.LinqService).sql index a3b402cb395e..6d071661deb4 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Jet.OleDb.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) > 0 +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Jet.OleDb.LinqService).sql index a3b402cb395e..d5dd9f92e3b4 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Jet.OleDb.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Jet.OleDb.LinqService).sql index a3b402cb395e..05da0fbe757b 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Jet.OleDb.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 + +SELECT TOP 1 + CVar(@p), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(@p_1) diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Jet.OleDb.LinqService).sql index a3b402cb395e..05da0fbe757b 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Jet.OleDb.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 + +SELECT TOP 1 + CVar(@p), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(@p_1) diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Jet.OleDb.LinqService).sql index a3b402cb395e..d5dd9f92e3b4 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Jet.OleDb.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Jet.OleDb.LinqService).sql index a3b402cb395e..31eacc821764 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Jet.OleDb.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Jet.OleDb.LinqService).sql index a3b402cb395e..0d56e7f03166 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Jet.OleDb.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Jet.OleDb.LinqService).sql index a3b402cb395e..3b17706f54d3 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Jet.OleDb.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 + +SELECT TOP 2 + CVar(@p), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(@p_1) diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Jet.OleDb.LinqService).sql index a3b402cb395e..3b17706f54d3 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Jet.OleDb.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 + +SELECT TOP 2 + CVar(@p), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(@p_1) diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..11d51407cd28 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Jet.OleDb.LinqService).sql index 7202158ad90f..4e4e62480833 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Jet.OleDb.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value VarWChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Access.Jet.OleDb AccessOleDb SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Value VarWChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] [obj] +SET + [obj].[Stamp] = [obj].[Stamp] + 1, + [obj].[Value] = @Value +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- Access.Jet.OleDb AccessOleDb @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Value VarWChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] [obj] +SET + [obj].[Stamp] = [obj].[Stamp] + 1, + [obj].[Value] = @Value +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- Access.Jet.OleDb AccessOleDb @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Value VarWChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] [obj] +SET + [obj].[Stamp] = [obj].[Stamp] + 1, + [obj].[Value] = @Value +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- Access.Jet.OleDb AccessOleDb @@ -38,6 +111,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- Access.Jet.OleDb AccessOleDb @@ -48,6 +133,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -8 + +DELETE FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- Access.Jet.OleDb AccessOleDb diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Jet.OleDb.LinqService).sql index 719c5d89549f..2ac031cdd74f 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Jet.OleDb.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value VarWChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Access.Jet.OleDb AccessOleDb SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Value VarWChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] [r] +SET + [r].[Stamp] = [r].[Stamp] + 1, + [r].[Value] = @Value +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- Access.Jet.OleDb AccessOleDb @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Value VarWChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] [r] +SET + [r].[Stamp] = [r].[Stamp] + 1, + [r].[Value] = @Value +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- Access.Jet.OleDb AccessOleDb @@ -28,6 +84,18 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- Access.Jet.OleDb AccessOleDb @@ -38,6 +106,18 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- Access.Jet.OleDb AccessOleDb diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..3179dc6d5232 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..d79ecf003a02 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..3f3b041d07f4 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON ([c_1].[ParentID] = [a_Parent].[ParentID]) + WHERE + [a_Parent].[ParentID] = [t1].[ParentID] + )) +FROM + [Parent] [t1] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Jet.OleDb.LinqService).sql index b4637c11b726..c915dcd709e1 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Jet.OleDb.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [DynamicParent] - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -CREATE TABLE [DynamicParent] -( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [DynamicChild] - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -CREATE TABLE [DynamicChild] -( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [DynamicChild] - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [DynamicParent] +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON ([it].[ID] = [a_Child].[ParentID]) +WHERE + [a_Child].[ID] = 123 diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Jet.OleDb.LinqService).sql index 37519eb0a3f5..f52d9675f56d 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Jet.OleDb.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP 1 + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON ([m_1].[ParentID] = [d].[ParentID]) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(Unspecified) BeforeExecute -- Access.Jet.OleDb AccessOleDb (asynchronously) diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Jet.OleDb.LinqService).sql index 4b647e117ebd..49abffd7d5f3 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Jet.OleDb.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP 1 + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON ([m_1].[ParentID] = [d].[ParentID]) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- Access.Jet.OleDb AccessOleDb (asynchronously) diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..13fc3a39b323 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON ([a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID]) + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..c47d61389b2b --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..7cab87212077 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = 'F' + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..aac72730a4dd --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + 1 + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..c2ffd5a38a4a --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.OleDb.LinqService,False).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.OleDb.LinqService,False).sql new file mode 100644 index 000000000000..4d1c7ab8dc17 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.OleDb.LinqService,False).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.OleDb.LinqService,True).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.OleDb.LinqService,True).sql new file mode 100644 index 000000000000..4d1c7ab8dc17 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Jet.OleDb.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.OleDb.LinqService,False).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.OleDb.LinqService,False).sql new file mode 100644 index 000000000000..4d1c7ab8dc17 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.OleDb.LinqService,False).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.OleDb.LinqService,True).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.OleDb.LinqService,True).sql new file mode 100644 index 000000000000..4d1c7ab8dc17 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Jet.OleDb.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Jet.OleDb.LinqService).sql index 40e0659099b9..7dcdc528e4f4 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Jet.OleDb.LinqService).sql @@ -1,74 +1,10 @@ BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [TakeSkipClass] - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -CREATE TABLE [TakeSkipClass] -( - [Value] VarChar(10) NULL -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- Access.Jet.OleDb AccessOleDb - -DROP TABLE [TakeSkipClass] +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.OleDb.LinqService,False).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.OleDb.LinqService,False).sql index 405585ae9181..0f4b7bfa86c9 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.OleDb.LinqService,False).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.OleDb.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP 3 FROM [Child] [ch] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.OleDb.LinqService,True).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.OleDb.LinqService,True).sql index 405585ae9181..0f4b7bfa86c9 100644 --- a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.OleDb.LinqService,True).sql +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Jet.OleDb.LinqService,True).sql @@ -16,3 +16,21 @@ SELECT TOP 3 FROM [Child] [ch] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.OleDb.LinqService,False).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.OleDb.LinqService,False).sql new file mode 100644 index 000000000000..3f3d93a47962 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.OleDb.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 1 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.OleDb.LinqService,True).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.OleDb.LinqService,True).sql new file mode 100644 index 000000000000..3f3d93a47962 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Jet.OleDb.LinqService,True).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 1 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.OleDb.LinqService,False).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.OleDb.LinqService,False).sql new file mode 100644 index 000000000000..0312617dcb9f --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.OleDb.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.OleDb.LinqService,True).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.OleDb.LinqService,True).sql new file mode 100644 index 000000000000..0312617dcb9f --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Jet.OleDb.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.OleDb.LinqService,False).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.OleDb.LinqService,False).sql new file mode 100644 index 000000000000..ebfee498d767 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.OleDb.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.OleDb.LinqService,True).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.OleDb.LinqService,True).sql new file mode 100644 index 000000000000..ebfee498d767 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Jet.OleDb.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.OleDb.LinqService,False).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.OleDb.LinqService,False).sql new file mode 100644 index 000000000000..ff1cccac5fc0 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.OleDb.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.OleDb.LinqService,True).sql b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.OleDb.LinqService,True).sql new file mode 100644 index 000000000000..ff1cccac5fc0 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Jet.OleDb.LinqService,True).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,False,False).sql b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,False,False).sql index 69b671d35576..a4e7c39b1a72 100644 --- a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,False,False).sql +++ b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,False,True).sql b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,False,True).sql index 69b671d35576..a4e7c39b1a72 100644 --- a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,False,True).sql +++ b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,True,False).sql b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,True,False).sql index 69b671d35576..66082b8fba85 100644 --- a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,True,False).sql +++ b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Database\TestData].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,True,True).sql b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,True,True).sql index 69b671d35576..66082b8fba85 100644 --- a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,True,True).sql +++ b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,False,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Database\TestData].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,False,False).sql b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,False,False).sql index 69b671d35576..a4e7c39b1a72 100644 --- a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,False,False).sql +++ b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,False,True).sql b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,False,True).sql index 69b671d35576..a4e7c39b1a72 100644 --- a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,False,True).sql +++ b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,True,False).sql b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,True,False).sql index 69b671d35576..66082b8fba85 100644 --- a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,True,False).sql +++ b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Database\TestData].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,True,True).sql b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,True,True).sql index 69b671d35576..66082b8fba85 100644 --- a/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,True,True).sql +++ b/Access.Jet.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Jet.OleDb.LinqService,True,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Database\TestData].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..38c16c36e9d7 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [TestTable] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(255) NULL, + [CreatedOn] DateTime NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [TestTable] + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Jet.OleDb.LinqService).sql index 642728f1862f..57bd306f4f0e 100644 --- a/Access.Jet.OleDb.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Jet.OleDb.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [TempTable] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [TempTable] +( + [ID] Int NOT NULL +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- Access.Jet.OleDb AccessOleDb SELECT @@ -7,3 +32,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON ([p].[ParentID] = [t].[ID]) +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [TempTable] + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..9b6ffb061133 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,88 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @FirstName VarWChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarWChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarWChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +DELETE FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..7285ab0b0f4b --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..f40b09d28033 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..f40b09d28033 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Jet.OleDb.LinqService).sql index 4d3ec84bac12..64a3631aa9ee 100644 --- a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Jet.OleDb.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @FirstName VarWChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarWChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarWChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) DECLARE @FirstName VarWChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName VarWChar(4) -- String @@ -60,3 +100,32 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = 'Steven' AND [p].[LastName] = 'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Jet.OleDb.LinqService).sql index 2f606ee054ee..10ee0afffeb6 100644 --- a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Jet.OleDb.LinqService).sql @@ -54,3 +54,76 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'abc0' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'abc1' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'abc2' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..677275582d1d --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,129 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPatient] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(255) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO [xxPatient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO [xxPatient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPatient] + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Jet.OleDb.LinqService).sql index 2f606ee054ee..c207b2ae8e1b 100644 --- a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Jet.OleDb.LinqService).sql @@ -54,3 +54,74 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 0 +DECLARE @id Integer -- Int32 +SET @id = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + @i), NULL) +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 1 +DECLARE @id Integer -- Int32 +SET @id = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + @i), NULL) +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 2 +DECLARE @id Integer -- Int32 +SET @id = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + @i), NULL) +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Jet.OleDb.LinqService).sql index 2f606ee054ee..2e9e4aeebbe8 100644 --- a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Jet.OleDb.LinqService).sql @@ -54,3 +54,74 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 0 +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + @i), NULL) +WHERE + [t1].[PersonID] = @id2 + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 1 +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + @i), NULL) +WHERE + [t1].[PersonID] = @id2 + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 2 +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + @i), NULL) +WHERE + [t1].[PersonID] = @id2 + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Jet.OleDb.LinqService).sql index dc3fa42fa249..711b8fcd5c7f 100644 --- a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Jet.OleDb.LinqService).sql @@ -27,6 +27,20 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Jet.OleDb AccessOleDb diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Jet.OleDb.LinqService).sql index dc3fa42fa249..711b8fcd5c7f 100644 --- a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Jet.OleDb.LinqService).sql @@ -27,6 +27,20 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Jet.OleDb AccessOleDb diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Jet.OleDb.LinqService).sql index 2a84c928ef47..90dfb0b5c81d 100644 --- a/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Jet.OleDb.LinqService).sql @@ -37,6 +37,22 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p VarWChar(5) -- String +SET @p = 'John0' + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Jet.OleDb AccessOleDb (asynchronously) DECLARE @FirstName VarWChar(5) -- String @@ -68,6 +84,22 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p VarWChar(5) -- String +SET @p = 'John1' + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Jet.OleDb AccessOleDb diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..2bd489fc3c5b --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +UPDATE + [Parent] [p1] + INNER JOIN [Parent] [p2] ON ([p1].[ParentID] = [p2].[ParentID]) +SET + [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..db48cdcf0d51 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] [p] +SET + [p].[ParentID] = [p].[ParentID] + 1 +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..db48cdcf0d51 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] [p] +SET + [p].[ParentID] = [p].[ParentID] + 1 +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..686774afef2c --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,53 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +UPDATE + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON ([c_1].[ParentID] = [a_Parent].[ParentID]) +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..80979caf88fb --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +UPDATE + [Parent] [a_Parent], + [Child] [child_1] +SET + [a_Parent].[Value1] = 5 +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [a_Parent].[ParentID] + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..80979caf88fb --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +UPDATE + [Parent] [a_Parent], + [Child] [child_1] +SET + [a_Parent].[Value1] = 5 +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [a_Parent].[ParentID] + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Jet.OleDb.LinqService).sql new file mode 100644 index 000000000000..c12517056c61 --- /dev/null +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Jet.OleDb.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @FirstName VarWChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarWChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarWChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @FirstName VarWChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarWChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarWChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] [t1] +SET + [t1].[FirstName] = @FirstName, + [t1].[LastName] = @LastName, + [t1].[MiddleName] = @MiddleName, + [t1].[Gender] = @Gender +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Jet.OleDb.LinqService).sql b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Jet.OleDb.LinqService).sql index 4d9b828203bd..5298d594f181 100644 --- a/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Jet.OleDb.LinqService).sql +++ b/Access.Jet.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Jet.OleDb.LinqService).sql @@ -54,3 +54,58 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 1 + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @Gender WChar(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName VarWChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName VarWChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName VarWChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer -- Int32 +SET @ID = 5 + +UPDATE + [Person] [t1] +SET + [t1].[Gender] = @Gender, + [t1].[FirstName] = @Name_FirstName, + [t1].[MiddleName] = @Name_MiddleName, + [t1].[LastName] = @Name_LastName +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 1 + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/Access.Jet.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Jet.OleDb).sql b/Access.Jet.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Jet.OleDb).sql new file mode 100644 index 000000000000..bb3bbba7e89f --- /dev/null +++ b/Access.Jet.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Jet.OleDb).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Jet.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Jet.OleDb).sql b/Access.Jet.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Jet.OleDb).sql new file mode 100644 index 000000000000..b1a5aa6793e3 --- /dev/null +++ b/Access.Jet.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Jet.OleDb).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Jet.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Jet.OleDb).sql b/Access.Jet.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Jet.OleDb).sql new file mode 100644 index 000000000000..b1a5aa6793e3 --- /dev/null +++ b/Access.Jet.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Jet.OleDb).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Jet.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From 57f8080f7f89979e1c4eaa9d49c6e5f0050f5b86 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:52:51 +0000 Subject: [PATCH 16/40] [Linux / MySQL 9 (both providers)] baselines --- ...Tests.All4Async(MySql.8.0.LinqService).sql | 13 ++ ...s.GroupBy2Async(MySql.8.0.LinqService).sql | 30 +++ ...Enumerable1Test(MySql.8.0.LinqService).sql | 9 + ...Enumerable2Test(MySql.8.0.LinqService).sql | 11 + ...erableCast1Test(MySql.8.0.LinqService).sql | 9 + ...erableCast2Test(MySql.8.0.LinqService).sql | 11 + ...ntainsAsyncTest(MySql.8.0.LinqService).sql | 17 ++ ....FirstAsyncTest(MySql.8.0.LinqService).sql | 15 ++ ...ts.TakeSkipTest(MySql.8.0.LinqService).sql | 16 ++ ...tFirstOrDefault(MySql.8.0.LinqService).sql | 20 ++ ...LookupAsyncTest(MySql.8.0.LinqService).sql | 21 ++ ...lementAsyncTest(MySql.8.0.LinqService).sql | 21 ++ ...ts.AnyTestAsync(MySql.8.0.LinqService).sql | 30 +++ ...s.AnyTestAsync2(MySql.8.0.LinqService).sql | 30 +++ ...MethoAsyncdTest(MySql.8.0.LinqService).sql | 16 ++ ...piledTest3Async(MySql.8.0.LinqService).sql | 28 +++ ...ntainsTestAsync(MySql.8.0.LinqService).sql | 34 +++ ....CountTestAsync(MySql.8.0.LinqService).sql | 24 ++ ...CountTestAsync2(MySql.8.0.LinqService).sql | 24 ++ ...ementTestAsync1(MySql.8.0.LinqService).sql | 28 +++ ...ementTestAsync2(MySql.8.0.LinqService).sql | 28 +++ ...ts.MaxTestAsync(MySql.8.0.LinqService).sql | 24 ++ ...s.MaxTestAsync2(MySql.8.0.LinqService).sql | 24 ++ ...yPredicateAsync(MySql.8.0.LinqService).sql | 171 ++------------ ...tPredicateAsync(MySql.8.0.LinqService).sql | 168 +------------- ...tPredicateAsync(MySql.8.0.LinqService).sql | 170 +------------- ...tPredicateAsync(MySql.8.0.LinqService).sql | 170 +------------- ...tPredicateAsync(MySql.8.0.LinqService).sql | 168 +------------- ...axSelectorAsync(MySql.8.0.LinqService).sql | 168 +------------- ...inSelectorAsync(MySql.8.0.LinqService).sql | 168 +------------- ...tPredicateAsync(MySql.8.0.LinqService).sql | 170 +------------- ...ePredicateAsync(MySql.8.0.LinqService).sql | 170 +------------- ...ts.Concat1Async(MySql.8.0.LinqService).sql | 19 ++ ...oIncrementAsync(MySql.8.0.LinqService).sql | 99 ++++++++ ...stFilteredAsync(MySql.8.0.LinqService).sql | 84 +++++++ ...sts.Count1Async(MySql.8.0.LinqService).sql | 8 + ...sts.Count2Async(MySql.8.0.LinqService).sql | 10 + ...bQueryMax1Async(MySql.8.0.LinqService).sql | 16 ++ ...Tests.Issue4602(MySql.8.0.LinqService).sql | 48 +--- ...Issue4057_Async(MySql.8.0.LinqService).sql | 31 +++ ...icitTransaction(MySql.8.0.LinqService).sql | 31 +++ ...ExpressionAsync(MySql.8.0.LinqService).sql | 25 ++ ...ests.Cast1Async(MySql.8.0.LinqService).sql | 11 + ...sts.Test18Async(MySql.8.0.LinqService).sql | 14 ++ ...Parameter1Async(MySql.8.0.LinqService).sql | 6 + ...s.Issue3132Test(MySql.8.0.LinqService).sql | 213 ++++++++++++++++++ ...tAt2Async(MySql.8.0.LinqService,False).sql | 16 ++ ...ntAt2Async(MySql.8.0.LinqService,True).sql | 16 ++ ...ult3Async(MySql.8.0.LinqService,False).sql | 16 ++ ...ault3Async(MySql.8.0.LinqService,True).sql | 16 ++ ...tipleSkip1Async(MySql.8.0.LinqService).sql | 83 +------ ...ake1Async(MySql.8.0.LinqService,False).sql | 20 ++ ...Take1Async(MySql.8.0.LinqService,True).sql | 24 ++ ...ake2Async(MySql.8.0.LinqService,False).sql | 12 + ...Take2Async(MySql.8.0.LinqService,True).sql | 12 + ...ake3Async(MySql.8.0.LinqService,False).sql | 12 + ...Take3Async(MySql.8.0.LinqService,True).sql | 14 ++ ...ake4Async(MySql.8.0.LinqService,False).sql | 12 + ...Take4Async(MySql.8.0.LinqService,True).sql | 14 ++ ...ake5Async(MySql.8.0.LinqService,False).sql | 10 + ...Take5Async(MySql.8.0.LinqService,True).sql | 12 + ...Sql.8.0.LinqService,False,False,False).sql | 16 ++ ...ySql.8.0.LinqService,False,False,True).sql | 16 ++ ...ySql.8.0.LinqService,False,True,False).sql | 16 ++ ...MySql.8.0.LinqService,False,True,True).sql | 16 ++ ...ySql.8.0.LinqService,True,False,False).sql | 16 ++ ...MySql.8.0.LinqService,True,False,True).sql | 16 ++ ...MySql.8.0.LinqService,True,True,False).sql | 16 ++ ...(MySql.8.0.LinqService,True,True,True).sql | 16 ++ ...eateTable1Async(MySql.8.0.LinqService).sql | 34 +++ ...reateTableAsync(MySql.8.0.LinqService).sql | 30 +++ ...yTableNameAsync(MySql.8.0.LinqService).sql | 90 ++++++++ ...ts.Insert2Async(MySql.8.0.LinqService).sql | 46 ++++ ...ts.Insert3Async(MySql.8.0.LinqService).sql | 48 ++++ ...ts.Insert4Async(MySql.8.0.LinqService).sql | 48 ++++ ...yTableNameAsync(MySql.8.0.LinqService).sql | 69 ++++++ ...OrReplace1Async(MySql.8.0.LinqService).sql | 74 ++++++ ...yTableNameAsync(MySql.8.0.LinqService).sql | 117 ++++++++++ ...tOrUpdate3Async(MySql.8.0.LinqService).sql | 74 ++++++ ...OrUpdate3xAsync(MySql.8.0.LinqService).sql | 74 ++++++ ...hIdentity1Async(MySql.8.0.LinqService).sql | 15 ++ ...hIdentity2Async(MySql.8.0.LinqService).sql | 15 ++ ...hIdentity4Async(MySql.8.0.LinqService).sql | 34 +++ ...s.Update12Async(MySql.8.0.LinqService).sql | 11 + ...ts.Update1Async(MySql.8.0.LinqService).sql | 54 +++++ ...ts.Update2Async(MySql.8.0.LinqService).sql | 54 +++++ ...ts.Update4Async(MySql.8.0.LinqService).sql | 53 +++++ ...sociation1Async(MySql.8.0.LinqService).sql | 39 ++++ ...iation1AsyncOld(MySql.8.0.LinqService).sql | 39 ++++ ...yTableNameAsync(MySql.8.0.LinqService).sql | 107 +++++++++ ...teComplex1Async(MySql.8.0.LinqService).sql | 57 +++++ .../Tests.Linq.AsyncTests.Test(MySql.8.0).sql | 18 ++ ...Tests.Linq.AsyncTests.Test1(MySql.8.0).sql | 9 + ...Linq.AsyncTests.TestForEach(MySql.8.0).sql | 9 + ...4Async(MySqlConnector.8.0.LinqService).sql | 13 ++ ...2Async(MySqlConnector.8.0.LinqService).sql | 30 +++ ...e1Test(MySqlConnector.8.0.LinqService).sql | 9 + ...e2Test(MySqlConnector.8.0.LinqService).sql | 11 + ...t1Test(MySqlConnector.8.0.LinqService).sql | 9 + ...t2Test(MySqlConnector.8.0.LinqService).sql | 11 + ...ncTest(MySqlConnector.8.0.LinqService).sql | 17 ++ ...ncTest(MySqlConnector.8.0.LinqService).sql | 15 ++ ...ipTest(MySqlConnector.8.0.LinqService).sql | 16 ++ ...efault(MySqlConnector.8.0.LinqService).sql | 20 ++ ...ncTest(MySqlConnector.8.0.LinqService).sql | 21 ++ ...ncTest(MySqlConnector.8.0.LinqService).sql | 21 ++ ...tAsync(MySqlConnector.8.0.LinqService).sql | 30 +++ ...Async2(MySqlConnector.8.0.LinqService).sql | 30 +++ ...cdTest(MySqlConnector.8.0.LinqService).sql | 16 ++ ...3Async(MySqlConnector.8.0.LinqService).sql | 28 +++ ...tAsync(MySqlConnector.8.0.LinqService).sql | 34 +++ ...tAsync(MySqlConnector.8.0.LinqService).sql | 24 ++ ...Async2(MySqlConnector.8.0.LinqService).sql | 24 ++ ...Async1(MySqlConnector.8.0.LinqService).sql | 28 +++ ...Async2(MySqlConnector.8.0.LinqService).sql | 28 +++ ...tAsync(MySqlConnector.8.0.LinqService).sql | 24 ++ ...Async2(MySqlConnector.8.0.LinqService).sql | 24 ++ ...eAsync(MySqlConnector.8.0.LinqService).sql | 171 ++------------ ...eAsync(MySqlConnector.8.0.LinqService).sql | 168 +------------- ...eAsync(MySqlConnector.8.0.LinqService).sql | 170 +------------- ...eAsync(MySqlConnector.8.0.LinqService).sql | 170 +------------- ...eAsync(MySqlConnector.8.0.LinqService).sql | 168 +------------- ...rAsync(MySqlConnector.8.0.LinqService).sql | 168 +------------- ...rAsync(MySqlConnector.8.0.LinqService).sql | 168 +------------- ...eAsync(MySqlConnector.8.0.LinqService).sql | 170 +------------- ...eAsync(MySqlConnector.8.0.LinqService).sql | 170 +------------- ...1Async(MySqlConnector.8.0.LinqService).sql | 19 ++ ...tAsync(MySqlConnector.8.0.LinqService).sql | 99 ++++++++ ...dAsync(MySqlConnector.8.0.LinqService).sql | 84 +++++++ ...1Async(MySqlConnector.8.0.LinqService).sql | 8 + ...2Async(MySqlConnector.8.0.LinqService).sql | 10 + ...1Async(MySqlConnector.8.0.LinqService).sql | 16 ++ ...ue4602(MySqlConnector.8.0.LinqService).sql | 48 +--- ..._Async(MySqlConnector.8.0.LinqService).sql | 31 +++ ...action(MySqlConnector.8.0.LinqService).sql | 31 +++ ...nAsync(MySqlConnector.8.0.LinqService).sql | 25 ++ ...1Async(MySqlConnector.8.0.LinqService).sql | 11 + ...8Async(MySqlConnector.8.0.LinqService).sql | 14 ++ ...1Async(MySqlConnector.8.0.LinqService).sql | 6 + ...32Test(MySqlConnector.8.0.LinqService).sql | 213 ++++++++++++++++++ ...(MySqlConnector.8.0.LinqService,False).sql | 16 ++ ...c(MySqlConnector.8.0.LinqService,True).sql | 16 ++ ...(MySqlConnector.8.0.LinqService,False).sql | 16 ++ ...c(MySqlConnector.8.0.LinqService,True).sql | 16 ++ ...1Async(MySqlConnector.8.0.LinqService).sql | 83 +------ ...(MySqlConnector.8.0.LinqService,False).sql | 20 ++ ...c(MySqlConnector.8.0.LinqService,True).sql | 24 ++ ...(MySqlConnector.8.0.LinqService,False).sql | 12 + ...c(MySqlConnector.8.0.LinqService,True).sql | 12 + ...(MySqlConnector.8.0.LinqService,False).sql | 12 + ...c(MySqlConnector.8.0.LinqService,True).sql | 14 ++ ...(MySqlConnector.8.0.LinqService,False).sql | 12 + ...c(MySqlConnector.8.0.LinqService,True).sql | 14 ++ ...(MySqlConnector.8.0.LinqService,False).sql | 10 + ...c(MySqlConnector.8.0.LinqService,True).sql | 12 + ...tor.8.0.LinqService,False,False,False).sql | 16 ++ ...ctor.8.0.LinqService,False,False,True).sql | 16 ++ ...ctor.8.0.LinqService,False,True,False).sql | 16 ++ ...ector.8.0.LinqService,False,True,True).sql | 16 ++ ...ctor.8.0.LinqService,True,False,False).sql | 16 ++ ...ector.8.0.LinqService,True,False,True).sql | 16 ++ ...ector.8.0.LinqService,True,True,False).sql | 16 ++ ...nector.8.0.LinqService,True,True,True).sql | 16 ++ ...1Async(MySqlConnector.8.0.LinqService).sql | 34 +++ ...eAsync(MySqlConnector.8.0.LinqService).sql | 30 +++ ...eAsync(MySqlConnector.8.0.LinqService).sql | 90 ++++++++ ...2Async(MySqlConnector.8.0.LinqService).sql | 46 ++++ ...3Async(MySqlConnector.8.0.LinqService).sql | 48 ++++ ...4Async(MySqlConnector.8.0.LinqService).sql | 48 ++++ ...eAsync(MySqlConnector.8.0.LinqService).sql | 69 ++++++ ...1Async(MySqlConnector.8.0.LinqService).sql | 74 ++++++ ...eAsync(MySqlConnector.8.0.LinqService).sql | 117 ++++++++++ ...3Async(MySqlConnector.8.0.LinqService).sql | 74 ++++++ ...xAsync(MySqlConnector.8.0.LinqService).sql | 74 ++++++ ...1Async(MySqlConnector.8.0.LinqService).sql | 15 ++ ...2Async(MySqlConnector.8.0.LinqService).sql | 15 ++ ...4Async(MySqlConnector.8.0.LinqService).sql | 34 +++ ...2Async(MySqlConnector.8.0.LinqService).sql | 11 + ...1Async(MySqlConnector.8.0.LinqService).sql | 54 +++++ ...2Async(MySqlConnector.8.0.LinqService).sql | 54 +++++ ...4Async(MySqlConnector.8.0.LinqService).sql | 53 +++++ ...1Async(MySqlConnector.8.0.LinqService).sql | 39 ++++ ...yncOld(MySqlConnector.8.0.LinqService).sql | 39 ++++ ...eAsync(MySqlConnector.8.0.LinqService).sql | 107 +++++++++ ...1Async(MySqlConnector.8.0.LinqService).sql | 57 +++++ ...nq.AsyncTests.Test(MySqlConnector.8.0).sql | 18 ++ ...q.AsyncTests.Test1(MySqlConnector.8.0).sql | 9 + ...cTests.TestForEach(MySqlConnector.8.0).sql | 9 + 188 files changed, 5446 insertions(+), 3066 deletions(-) create mode 100644 MySql.8.0.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.8.0.LinqService,False).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.8.0.LinqService,True).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.8.0.LinqService,False).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.8.0.LinqService,True).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.8.0.LinqService,False).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.8.0.LinqService,True).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.8.0.LinqService,False).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.8.0.LinqService,True).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.8.0.LinqService,False).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.8.0.LinqService,True).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.8.0.LinqService,False).sql create mode 100644 MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.8.0.LinqService,True).sql create mode 100644 MySql.8.0.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySql.8.0.LinqService).sql create mode 100644 MySql.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySql.8.0).sql create mode 100644 MySql.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySql.8.0).sql create mode 100644 MySql.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySql.8.0).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.8.0.LinqService,False).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.8.0.LinqService,True).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.8.0.LinqService,False).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.8.0.LinqService,True).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.8.0.LinqService,False).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.8.0.LinqService,True).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.8.0.LinqService,False).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.8.0.LinqService,True).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.8.0.LinqService,False).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.8.0.LinqService,True).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.8.0.LinqService,False).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.8.0.LinqService,True).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySqlConnector.8.0.LinqService).sql create mode 100644 MySqlConnector.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySqlConnector.8.0).sql create mode 100644 MySqlConnector.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySqlConnector.8.0).sql create mode 100644 MySqlConnector.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySqlConnector.8.0).sql diff --git a/MySql.8.0.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..cb8db159ecfb --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySql.8.0.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` <= 3 + ) as `c1` + diff --git a/MySql.8.0.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..85e83ece11ab --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySql.8.0.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT DISTINCT + `a_Parent1`.`ParentID` + FROM + `Child` `t1` + INNER JOIN `Parent` `a_Parent1` ON `t1`.`ParentID` = `a_Parent1`.`ParentID` + ) `m_1` + INNER JOIN (`Child` `d` + INNER JOIN `Parent` `a_Parent1_1` ON `d`.`ParentID` = `a_Parent1_1`.`ParentID`) + ON `m_1`.`ParentID` = `a_Parent1_1`.`ParentID` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `a_Parent1`.`ParentID` +FROM + `Child` `t1` + INNER JOIN `Parent` `a_Parent1` ON `t1`.`ParentID` = `a_Parent1`.`ParentID` +GROUP BY + `a_Parent1`.`ParentID` + diff --git a/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..b7e776f1d97b --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySql.8.0.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..72d399167388 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySql.8.0.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` > 1 + diff --git a/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..b7e776f1d97b --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySql.8.0.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..72d399167388 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySql.8.0.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` > 1 + diff --git a/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..1a890bbdc202 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySql.8.0.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + `t1`.`PersonID` + FROM + `Person` `t1` + ) + THEN 1 + ELSE 0 + END as `c1` + diff --git a/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..f6bc4a41487b --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySql.8.0.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`PersonID` = 1 +LIMIT 1 + diff --git a/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySql.8.0.LinqService).sql index 5c6e429746d3..15f2f9e249b2 100644 --- a/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySql.8.0.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY `t1`.`ParentID` LIMIT @skip, @take +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @skip Int32 +SET @skip = 1 +DECLARE @take Int32 +SET @take = 2 + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` +ORDER BY + `t1`.`ParentID` +LIMIT @skip, @take + diff --git a/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..9523b4e7e7b0 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySql.8.0.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 +DECLARE @p_1 Int32 +SET @p_1 = 2 +DECLARE @p_2 Int32 +SET @p_2 = 3 +DECLARE @param Int32 +SET @param = 4 + +SELECT + `o`.`ParentID`, + `o`.`Value1` +FROM + `Parent` `o` +WHERE + `o`.`ParentID` IN (@p, @p_1, @p_2) OR `o`.`ParentID` = @param +LIMIT 1 + diff --git a/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..19d64bb0ae9e --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySql.8.0.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +ORDER BY + `t1`.`ParentID`, + `t1`.`ChildID` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` + diff --git a/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..19d64bb0ae9e --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySql.8.0.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +ORDER BY + `t1`.`ParentID`, + `t1`.`ChildID` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` + diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..8d4dc54e595d --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySql.8.0.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..8d4dc54e595d --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySql.8.0.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..f01c3ea9c4a5 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySql.8.0.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = @p +ORDER BY + `x`.`ParentID` DESC +LIMIT 1 + diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..137589eaa61c --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySql.8.0.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT @p + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT @p + diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..8082c817489c --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySql.8.0.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + `c_1`.`ParentID` + FROM + `Child` `c_1` + ) + THEN 1 + ELSE 0 + END as `c1` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + `c_1`.`ParentID` + FROM + `Child` `c_1` + ) + THEN 1 + ELSE 0 + END as `c1` + diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..d96b7dae5433 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySql.8.0.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..d96b7dae5433 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySql.8.0.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..b78ef6cb67e7 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySql.8.0.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..b78ef6cb67e7 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySql.8.0.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..00b11bb4cf1d --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySql.8.0.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..00b11bb4cf1d --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySql.8.0.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySql.8.0.LinqService).sql index d7ff89e63a26..f84fd6ee1139 100644 --- a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySql.8.0.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + `AsyncDataTable` `c_1` + WHERE + `c_1`.`Id` = @p + ) as `c1` diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySql.8.0.LinqService).sql index d7ff89e63a26..a32ecb6efcad 100644 --- a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySql.8.0.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySql.8.0.LinqService).sql index d7ff89e63a26..6db2df66ff1e 100644 --- a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySql.8.0.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 1 diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySql.8.0.LinqService).sql index d7ff89e63a26..6db2df66ff1e 100644 --- a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySql.8.0.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 1 diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySql.8.0.LinqService).sql index d7ff89e63a26..a32ecb6efcad 100644 --- a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySql.8.0.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySql.8.0.LinqService).sql index d7ff89e63a26..9fa0e54369c0 100644 --- a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySql.8.0.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MAX(`c_1`.`Id`) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` > @p diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySql.8.0.LinqService).sql index d7ff89e63a26..672a5f0da816 100644 --- a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySql.8.0.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MIN(`c_1`.`Id`) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` > @p diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySql.8.0.LinqService).sql index d7ff89e63a26..2acf0370b001 100644 --- a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySql.8.0.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 2 diff --git a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySql.8.0.LinqService).sql index d7ff89e63a26..2acf0370b001 100644 --- a/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySql.8.0.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 2 diff --git a/MySql.8.0.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..1db1aa318c9f --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySql.8.0.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = 1 +UNION ALL +SELECT + `p_1`.`ParentID`, + `p_1`.`Value1` +FROM + `Parent` `p_1` +WHERE + `p_1`.`ParentID` = 2 + diff --git a/MySql.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySql.8.0.LinqService).sql index 8a4824afe0cc..8b56a68352f6 100644 --- a/MySql.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySql.8.0.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO `ConcurrencyAutoIncrement` +( + `Id`, + `Stamp`, + `Value` +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 SELECT @@ -8,6 +30,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 @@ -18,6 +57,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 @@ -28,6 +84,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 @@ -38,6 +111,19 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyAutoIncrement` +WHERE + `ConcurrencyAutoIncrement`.`Id` = @Id AND `ConcurrencyAutoIncrement`.`Stamp` = @Stamp + BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 @@ -48,6 +134,19 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -8 + +DELETE +FROM + `ConcurrencyAutoIncrement` +WHERE + `ConcurrencyAutoIncrement`.`Id` = @Id AND `ConcurrencyAutoIncrement`.`Stamp` = @Stamp + BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 diff --git a/MySql.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySql.8.0.LinqService).sql index 2e42001d0849..12ca419b2a9f 100644 --- a/MySql.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySql.8.0.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO `ConcurrencyFiltered` +( + `Id`, + `Stamp`, + `Value` +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 SELECT @@ -8,6 +30,23 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyFiltered` `r` +SET + `r`.`Stamp` = `r`.`Stamp` + 1, + `r`.`Value` = @Value +WHERE + `r`.`Id` = 2 AND `r`.`Id` = @Id AND `r`.`Stamp` = @Stamp + BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 @@ -18,6 +57,23 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyFiltered` `r` +SET + `r`.`Stamp` = `r`.`Stamp` + 1, + `r`.`Value` = @Value +WHERE + `r`.`Id` = 1 AND `r`.`Id` = @Id AND `r`.`Stamp` = @Stamp + BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 @@ -28,6 +84,20 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyFiltered` +WHERE + `ConcurrencyFiltered`.`Id` = 2 AND `ConcurrencyFiltered`.`Id` = @Id AND + `ConcurrencyFiltered`.`Stamp` = @Stamp + BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 @@ -38,6 +108,20 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyFiltered` +WHERE + `ConcurrencyFiltered`.`Id` = 1 AND `ConcurrencyFiltered`.`Id` = @Id AND + `ConcurrencyFiltered`.`Stamp` = @Stamp + BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 diff --git a/MySql.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..971afc25aa9a --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySql.8.0.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `Parent` `t1` + diff --git a/MySql.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..e560df2430a6 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySql.8.0.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 2 + diff --git a/MySql.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..df79abfbc27c --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySql.8.0.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + `Child` `c_1` + LEFT JOIN `Parent` `a_Parent` ON `c_1`.`ParentID` = `a_Parent`.`ParentID` + WHERE + `a_Parent`.`ParentID` = `t1`.`ParentID` + )) +FROM + `Parent` `t1` + diff --git a/MySql.8.0.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySql.8.0.LinqService).sql index e71f5a9369c0..4bf9b198e924 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySql.8.0.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `DynamicParent` - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -CREATE TABLE IF NOT EXISTS `DynamicParent` -( - `ID` INT AUTO_INCREMENT NOT NULL, - - CONSTRAINT `PK_DynamicParent` PRIMARY KEY CLUSTERED (`ID`) -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `DynamicChild` - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -CREATE TABLE IF NOT EXISTS `DynamicChild` -( - `ID` INT AUTO_INCREMENT NOT NULL, - `ParentID` INT NOT NULL, - - CONSTRAINT `PK_DynamicChild` PRIMARY KEY CLUSTERED (`ID`) -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `DynamicChild` - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `DynamicParent` +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `it`.`ID` +FROM + `DynamicParent` `it` + LEFT JOIN `DynamicChild` `a_Child` ON `it`.`ID` = `a_Child`.`ParentID` +WHERE + `a_Child`.`ID` = 123 diff --git a/MySql.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySql.8.0.LinqService).sql index ad1714e945ee..50444e18cb23 100644 --- a/MySql.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySql.8.0.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT + `x`.`ParentID` + FROM + `Parent` `x` + WHERE + `x`.`ParentID` = 3 + LIMIT 1 + ) `m_1` + INNER JOIN `Child` `d` ON `m_1`.`ParentID` = `d`.`ParentID` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) diff --git a/MySql.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySql.8.0.LinqService).sql index 8199dfbb6a84..8cb75bc3d363 100644 --- a/MySql.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySql.8.0.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT + `x`.`ParentID` + FROM + `Parent` `x` + WHERE + `x`.`ParentID` = 3 + LIMIT 1 + ) `m_1` + INNER JOIN `Child` `d` ON `m_1`.`ParentID` = `d`.`ParentID` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) diff --git a/MySql.8.0.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..05b4314540b2 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySql.8.0.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + `Child` `a_Children` + INNER JOIN `GrandChild` `a_GrandChildren` ON `a_Children`.`ParentID` = `a_GrandChildren`.`ParentID` AND `a_Children`.`ChildID` = `a_GrandChildren`.`ChildID` + WHERE + `p`.`ParentID` = `a_Children`.`ParentID` + ) +FROM + `Parent` `p` + diff --git a/MySql.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..480083e93761 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySql.8.0.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` +WHERE + `t1`.`Value1` = 1 + diff --git a/MySql.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..0cab37b70bf6 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySql.8.0.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT DISTINCT + `p1`.`PersonID`, + `p1`.`Gender`, + `p1`.`FirstName`, + `p1`.`LastName` +FROM + `Person` `p1` +WHERE + `p1`.`PersonID` IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + `p1`.`Gender` = 'F' + diff --git a/MySql.8.0.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..1483f3765a02 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySql.8.0.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + 1 as `c1` + diff --git a/MySql.8.0.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..0caa94e0c48c --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySql.8.0.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `x`.`MiddleName`, + COUNT(*) +FROM + `Person` `x` +WHERE + `x`.`MiddleName` IS NOT NULL +GROUP BY + `x`.`MiddleName` +UNION ALL +SELECT + `x_1`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_1` +WHERE + `x_1`.`MiddleName` IS NOT NULL +GROUP BY + `x_1`.`MiddleName` +UNION ALL +SELECT + `x_2`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_2` +WHERE + `x_2`.`MiddleName` IS NOT NULL +GROUP BY + `x_2`.`MiddleName` +UNION ALL +SELECT + `x_3`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_3` +WHERE + `x_3`.`MiddleName` IS NOT NULL +GROUP BY + `x_3`.`MiddleName` +UNION ALL +SELECT + `x_4`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_4` +WHERE + `x_4`.`MiddleName` IS NOT NULL +GROUP BY + `x_4`.`MiddleName` +UNION ALL +SELECT + `x_5`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_5` +WHERE + `x_5`.`MiddleName` IS NOT NULL +GROUP BY + `x_5`.`MiddleName` +UNION ALL +SELECT + `x_6`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_6` +WHERE + `x_6`.`MiddleName` IS NOT NULL +GROUP BY + `x_6`.`MiddleName` +UNION ALL +SELECT + `x_7`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_7` +WHERE + `x_7`.`MiddleName` IS NOT NULL +GROUP BY + `x_7`.`MiddleName` +UNION ALL +SELECT + `x_8`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_8` +WHERE + `x_8`.`MiddleName` IS NOT NULL +GROUP BY + `x_8`.`MiddleName` +UNION ALL +SELECT + `x_9`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_9` +WHERE + `x_9`.`MiddleName` IS NOT NULL +GROUP BY + `x_9`.`MiddleName` +UNION ALL +SELECT + `x_10`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_10` +WHERE + `x_10`.`MiddleName` IS NOT NULL +GROUP BY + `x_10`.`MiddleName` +UNION ALL +SELECT + `x_11`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_11` +WHERE + `x_11`.`MiddleName` IS NOT NULL +GROUP BY + `x_11`.`MiddleName` +UNION ALL +SELECT + `x_12`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_12` +WHERE + `x_12`.`MiddleName` IS NOT NULL +GROUP BY + `x_12`.`MiddleName` +UNION ALL +SELECT + `x_13`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_13` +WHERE + `x_13`.`MiddleName` IS NOT NULL +GROUP BY + `x_13`.`MiddleName` +UNION ALL +SELECT + `x_14`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_14` +WHERE + `x_14`.`MiddleName` IS NOT NULL +GROUP BY + `x_14`.`MiddleName` +UNION ALL +SELECT + `x_15`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_15` +WHERE + `x_15`.`MiddleName` IS NOT NULL +GROUP BY + `x_15`.`MiddleName` +UNION ALL +SELECT + `x_16`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_16` +WHERE + `x_16`.`MiddleName` IS NOT NULL +GROUP BY + `x_16`.`MiddleName` +UNION ALL +SELECT + `x_17`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_17` +WHERE + `x_17`.`MiddleName` IS NOT NULL +GROUP BY + `x_17`.`MiddleName` +UNION ALL +SELECT + `x_18`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_18` +WHERE + `x_18`.`MiddleName` IS NOT NULL +GROUP BY + `x_18`.`MiddleName` +UNION ALL +SELECT + `x_19`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_19` +WHERE + `x_19`.`MiddleName` IS NOT NULL +GROUP BY + `x_19`.`MiddleName` +UNION ALL +SELECT + `x_20`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_20` +WHERE + `x_20`.`MiddleName` IS NOT NULL +GROUP BY + `x_20`.`MiddleName` + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.8.0.LinqService,False).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.8.0.LinqService,False).sql new file mode 100644 index 000000000000..e4ceb7b7789d --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.8.0.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.8.0.LinqService,True).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.8.0.LinqService,True).sql new file mode 100644 index 000000000000..e4ceb7b7789d --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.8.0.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.8.0.LinqService,False).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.8.0.LinqService,False).sql new file mode 100644 index 000000000000..e4ceb7b7789d --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.8.0.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.8.0.LinqService,True).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.8.0.LinqService,True).sql new file mode 100644 index 000000000000..e4ceb7b7789d --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.8.0.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySql.8.0.LinqService).sql index f53de70bfc64..23555b70a256 100644 --- a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySql.8.0.LinqService).sql @@ -1,74 +1,13 @@ BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `TakeSkipClass` - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -CREATE TABLE IF NOT EXISTS `TakeSkipClass` -( - `Value` VARCHAR(10) NULL -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -DROP TABLE IF EXISTS `TakeSkipClass` +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @skip Int32 +SET @skip = 3 + +SELECT + `t1`.`Value` +FROM + `TakeSkipClass` `t1` +ORDER BY + `t1`.`Value` +LIMIT @skip, 9223372036854775807 diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.8.0.LinqService,False).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.8.0.LinqService,False).sql index a742914eee59..7a23f1ad69b6 100644 --- a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.8.0.LinqService,False).sql +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.8.0.LinqService,False).sql @@ -18,3 +18,23 @@ FROM `Child` `ch` LIMIT 3 +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT 2 + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT 3 + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.8.0.LinqService,True).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.8.0.LinqService,True).sql index 4603de01847f..88b49e6ac28e 100644 --- a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.8.0.LinqService,True).sql +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.8.0.LinqService,True).sql @@ -22,3 +22,27 @@ FROM `Child` `ch` LIMIT @take +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @take Int32 +SET @take = 2 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT @take + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT @take + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.8.0.LinqService,False).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.8.0.LinqService,False).sql new file mode 100644 index 000000000000..9fa0968b7ea7 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.8.0.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @n + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.8.0.LinqService,True).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.8.0.LinqService,True).sql new file mode 100644 index 000000000000..9fa0968b7ea7 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.8.0.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @n + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.8.0.LinqService,False).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.8.0.LinqService,False).sql new file mode 100644 index 000000000000..4b3acf0833be --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.8.0.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` > 3 OR `ch`.`ChildID` < 4 +LIMIT 3 + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.8.0.LinqService,True).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.8.0.LinqService,True).sql new file mode 100644 index 000000000000..9ee9ced00405 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.8.0.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` > 3 OR `ch`.`ChildID` < 4 +LIMIT @take + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.8.0.LinqService,False).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.8.0.LinqService,False).sql new file mode 100644 index 000000000000..2386a7dc4f6f --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.8.0.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` >= 0 AND `ch`.`ChildID` <= 100 +LIMIT 3 + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.8.0.LinqService,True).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.8.0.LinqService,True).sql new file mode 100644 index 000000000000..c39d318c2151 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.8.0.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` >= 0 AND `ch`.`ChildID` <= 100 +LIMIT @take + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.8.0.LinqService,False).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.8.0.LinqService,False).sql new file mode 100644 index 000000000000..63df65908ddc --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.8.0.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT 3 + diff --git a/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.8.0.LinqService,True).sql b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.8.0.LinqService,True).sql new file mode 100644 index 000000000000..f34608df078a --- /dev/null +++ b/MySql.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.8.0.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @take + diff --git a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,False,False).sql b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,False,False).sql index 21d3abea387f..6e0763264163 100644 --- a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,False,False).sql +++ b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,False,True).sql b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,False,True).sql index 21d3abea387f..6e0763264163 100644 --- a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,False,True).sql +++ b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,True,False).sql b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,True,False).sql index c164f152af5f..7497bd9c4b1c 100644 --- a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,True,False).sql +++ b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE `testdata`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,True,True).sql b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,True,True).sql index c164f152af5f..7497bd9c4b1c 100644 --- a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,True,True).sql +++ b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,False,True,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE `testdata`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,False,False).sql b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,False,False).sql index 21d3abea387f..6e0763264163 100644 --- a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,False,False).sql +++ b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,False,True).sql b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,False,True).sql index 21d3abea387f..6e0763264163 100644 --- a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,False,True).sql +++ b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,True,False).sql b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,True,False).sql index c164f152af5f..7497bd9c4b1c 100644 --- a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,True,False).sql +++ b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE `testdata`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,True,True).sql b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,True,True).sql index c164f152af5f..7497bd9c4b1c 100644 --- a/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,True,True).sql +++ b/MySql.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.8.0.LinqService,True,True,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE `testdata`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..bed017c77560 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySql.8.0.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `TestTable` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE `TestTable` +( + `ID` INT AUTO_INCREMENT NOT NULL, + `Field1` VARCHAR(50) NULL, + `Field2` VARCHAR(4000) NULL, + `CreatedOn` DATETIME NULL, + + CONSTRAINT `PK_TestTable` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ID`, + `t1`.`Field1`, + `t1`.`Field2`, + `t1`.`CreatedOn` +FROM + `TestTable` `t1` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE `TestTable` + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySql.8.0.LinqService).sql index 919896aadd0a..b6f96a5fb675 100644 --- a/MySql.8.0.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySql.8.0.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `TempTable` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE IF NOT EXISTS `TempTable` +( + `ID` INT NOT NULL +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +INSERT INTO `TempTable` +( + `ID` +) +SELECT + `p`.`ParentID` +FROM + `Parent` `p` + +BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 SELECT @@ -7,3 +32,8 @@ FROM `Parent` `p` INNER JOIN `TempTable` `t` ON `p`.`ParentID` = `t`.`ID` +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `TempTable` + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..e3b804ae40a0 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySql.8.0.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +DELETE +FROM + `xxPerson` +WHERE + `xxPerson`.`PersonID` = @ID + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE `xxPerson` + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..a7ed37c27c6b --- /dev/null +++ b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySql.8.0.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..3fd8c100e58d --- /dev/null +++ b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySql.8.0.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +SELECT + `c_1`.`ParentID`, + @id +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = 11 + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..3fd8c100e58d --- /dev/null +++ b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySql.8.0.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +SELECT + `c_1`.`ParentID`, + @id +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = 11 + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySql.8.0.LinqService).sql index 09c6893a72fe..2f1ac8c97bf6 100644 --- a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySql.8.0.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) DECLARE @FirstName VarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName VarChar(4) -- String @@ -60,3 +100,32 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `p` +WHERE + `p`.`FirstName` = 'Steven' AND `p`.`LastName` = 'King' AND + `p`.`Gender` = 'M' + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE `xxPerson` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySql.8.0.LinqService).sql index 66344a889063..38a5bfca543d 100644 --- a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySql.8.0.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..7d7c4cd1d675 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySql.8.0.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `xxPatient` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE `xxPatient` +( + `PersonID` INT NOT NULL, + `Diagnosis` VARCHAR(4000) NULL, + + CONSTRAINT `PK_xxPatient` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPatient` `t1` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPatient` `t1` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `xxPatient` + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySql.8.0.LinqService).sql index 66344a889063..76d17b6b063a 100644 --- a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySql.8.0.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySql.8.0.LinqService).sql index 66344a889063..76d17b6b063a 100644 --- a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySql.8.0.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySql.8.0.LinqService).sql index 01bc7ad7074c..e3c1191991e9 100644 --- a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySql.8.0.LinqService).sql @@ -28,6 +28,21 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = 'John' AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 diff --git a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySql.8.0.LinqService).sql index 01bc7ad7074c..e3c1191991e9 100644 --- a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySql.8.0.LinqService).sql @@ -28,6 +28,21 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = 'John' AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 diff --git a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySql.8.0.LinqService).sql index 6a5bfda4e3f1..252d3af65d1c 100644 --- a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySql.8.0.LinqService).sql @@ -38,6 +38,23 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John0' + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = @p AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) DECLARE @FirstName VarChar(5) -- String @@ -69,6 +86,23 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John1' + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = @p AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 diff --git a/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..6642edd23163 --- /dev/null +++ b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySql.8.0.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +UPDATE + `Parent` `p1` + INNER JOIN `Parent` `p2` ON `p1`.`ParentID` = `p2`.`ParentID` +SET + `p1`.`ParentID` = `p2`.`ParentID` +WHERE + `p1`.`ParentID` < 3 + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..1fec2539251f --- /dev/null +++ b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySql.8.0.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + `Parent` `p` +SET + `p`.`ParentID` = `p`.`ParentID` + 1 +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @p + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..1fec2539251f --- /dev/null +++ b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySql.8.0.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + `Parent` `p` +SET + `p`.`ParentID` = `p`.`ParentID` + 1 +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @p + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..9dfd6a053cce --- /dev/null +++ b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySql.8.0.LinqService).sql @@ -0,0 +1,53 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +UPDATE + `Child` `c_1` + LEFT JOIN `Parent` `a_Parent` ON `c_1`.`ParentID` = `a_Parent`.`ParentID` +SET + `c_1`.`ChildID` = `c_1`.`ChildID` + 1 +WHERE + `c_1`.`ChildID` = @id AND `a_Parent`.`Value1` = 1 + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @p + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..0890aaf558ad --- /dev/null +++ b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySql.8.0.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +INSERT INTO `Child` +( + `ChildID`, + `ParentID` +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +UPDATE + `Parent` `a_Parent`, + `Child` `child_1` +SET + `a_Parent`.`Value1` = 5 +WHERE + `child_1`.`ChildID` = 10000 AND `child_1`.`ParentID` = `a_Parent`.`ParentID` + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..0890aaf558ad --- /dev/null +++ b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySql.8.0.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +INSERT INTO `Child` +( + `ChildID`, + `ParentID` +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +UPDATE + `Parent` `a_Parent`, + `Child` `child_1` +SET + `a_Parent`.`Value1` = 5 +WHERE + `child_1`.`ChildID` = 10000 AND `child_1`.`ParentID` = `a_Parent`.`ParentID` + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySql.8.0.LinqService).sql new file mode 100644 index 000000000000..60a5f64dd59b --- /dev/null +++ b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySql.8.0.LinqService).sql @@ -0,0 +1,107 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Int32 +SET @ID = 1 + +UPDATE + `xxPerson` `t1` +SET + `t1`.`FirstName` = @FirstName, + `t1`.`LastName` = @LastName, + `t1`.`MiddleName` = @MiddleName, + `t1`.`Gender` = @Gender +WHERE + `t1`.`PersonID` = @ID + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +DROP TABLE `xxPerson` + diff --git a/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySql.8.0.LinqService).sql index 89dbde123b1a..7e94a95a5387 100644 --- a/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySql.8.0.LinqService).sql @@ -34,3 +34,60 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `t1`.`PersonID`, + `t1`.`Gender`, + `t1`.`FirstName`, + `t1`.`MiddleName`, + `t1`.`LastName` +FROM + `Person` `t1` +WHERE + `t1`.`PersonID` = @id +LIMIT 1 + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @Gender String(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName VarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName VarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName VarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int32 +SET @ID = 5 + +UPDATE + `Person` `t1` +SET + `t1`.`Gender` = @Gender, + `t1`.`FirstName` = @Name_FirstName, + `t1`.`MiddleName` = @Name_MiddleName, + `t1`.`LastName` = @Name_LastName +WHERE + `t1`.`PersonID` = @ID + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `t1`.`PersonID`, + `t1`.`Gender`, + `t1`.`FirstName`, + `t1`.`MiddleName`, + `t1`.`LastName` +FROM + `Person` `t1` +WHERE + `t1`.`PersonID` = @id +LIMIT 1 + diff --git a/MySql.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySql.8.0).sql b/MySql.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySql.8.0).sql new file mode 100644 index 000000000000..bcbeec08c161 --- /dev/null +++ b/MySql.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySql.8.0).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySql.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySql.8.0).sql b/MySql.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySql.8.0).sql new file mode 100644 index 000000000000..b7e776f1d97b --- /dev/null +++ b/MySql.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySql.8.0).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySql.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySql.8.0).sql b/MySql.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySql.8.0).sql new file mode 100644 index 000000000000..b7e776f1d97b --- /dev/null +++ b/MySql.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySql.8.0).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..39ad865886de --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` <= 3 + ) as `c1` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..56e11d5f537b --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT DISTINCT + `a_Parent1`.`ParentID` + FROM + `Child` `t1` + INNER JOIN `Parent` `a_Parent1` ON `t1`.`ParentID` = `a_Parent1`.`ParentID` + ) `m_1` + INNER JOIN (`Child` `d` + INNER JOIN `Parent` `a_Parent1_1` ON `d`.`ParentID` = `a_Parent1_1`.`ParentID`) + ON `m_1`.`ParentID` = `a_Parent1_1`.`ParentID` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `a_Parent1`.`ParentID` +FROM + `Child` `t1` + INNER JOIN `Parent` `a_Parent1` ON `t1`.`ParentID` = `a_Parent1`.`ParentID` +GROUP BY + `a_Parent1`.`ParentID` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..4141358b0a0d --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..e3caa513e21a --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` > 1 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..4141358b0a0d --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..e3caa513e21a --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` > 1 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..a45b26353860 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + `t1`.`PersonID` + FROM + `Person` `t1` + ) + THEN 1 + ELSE 0 + END as `c1` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..5305667d74f8 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`PersonID` = 1 +LIMIT 1 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySqlConnector.8.0.LinqService).sql index b9e3d8a20c9a..5ff326e13ba9 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySqlConnector.8.0.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY `t1`.`ParentID` LIMIT @skip, @take +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @skip Int32 +SET @skip = 1 +DECLARE @take Int32 +SET @take = 2 + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` +ORDER BY + `t1`.`ParentID` +LIMIT @skip, @take + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..dbc065fceb2c --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 +DECLARE @p_1 Int32 +SET @p_1 = 2 +DECLARE @p_2 Int32 +SET @p_2 = 3 +DECLARE @param Int32 +SET @param = 4 + +SELECT + `o`.`ParentID`, + `o`.`Value1` +FROM + `Parent` `o` +WHERE + `o`.`ParentID` IN (@p, @p_1, @p_2) OR `o`.`ParentID` = @param +LIMIT 1 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..0fe8ad453f30 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +ORDER BY + `t1`.`ParentID`, + `t1`.`ChildID` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..0fe8ad453f30 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +ORDER BY + `t1`.`ParentID`, + `t1`.`ChildID` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..35015a4e4fc1 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..35015a4e4fc1 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..09b86ea0d59c --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = @p +ORDER BY + `x`.`ParentID` DESC +LIMIT 1 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..d693a2b5e8e4 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT @p + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT @p + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..f9a66ef74628 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + `c_1`.`ParentID` + FROM + `Child` `c_1` + ) + THEN 1 + ELSE 0 + END as `c1` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + `c_1`.`ParentID` + FROM + `Child` `c_1` + ) + THEN 1 + ELSE 0 + END as `c1` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..6063ee3134cf --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..6063ee3134cf --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..9f9e7ee93dbe --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..9f9e7ee93dbe --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..8e1cb3d72add --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..8e1cb3d72add --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySqlConnector.8.0.LinqService).sql index 60510235dc5c..72191f5cb98c 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySqlConnector.8.0.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + `AsyncDataTable` `c_1` + WHERE + `c_1`.`Id` = @p + ) as `c1` diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySqlConnector.8.0.LinqService).sql index 60510235dc5c..97083564423f 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySqlConnector.8.0.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySqlConnector.8.0.LinqService).sql index 60510235dc5c..b3f1d82519d5 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySqlConnector.8.0.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 1 diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySqlConnector.8.0.LinqService).sql index 60510235dc5c..b3f1d82519d5 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySqlConnector.8.0.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 1 diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySqlConnector.8.0.LinqService).sql index 60510235dc5c..97083564423f 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySqlConnector.8.0.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySqlConnector.8.0.LinqService).sql index 60510235dc5c..f85399ccd946 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySqlConnector.8.0.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MAX(`c_1`.`Id`) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` > @p diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySqlConnector.8.0.LinqService).sql index 60510235dc5c..1161993b8c3c 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySqlConnector.8.0.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MIN(`c_1`.`Id`) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` > @p diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySqlConnector.8.0.LinqService).sql index 60510235dc5c..b201ea81c59d 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySqlConnector.8.0.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 2 diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySqlConnector.8.0.LinqService).sql index 60510235dc5c..b201ea81c59d 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySqlConnector.8.0.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 2 diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..6d8fdc26d665 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = 1 +UNION ALL +SELECT + `p_1`.`ParentID`, + `p_1`.`Value1` +FROM + `Parent` `p_1` +WHERE + `p_1`.`ParentID` = 2 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySqlConnector.8.0.LinqService).sql index 0455c4ed9605..026bbfb9c3e2 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySqlConnector.8.0.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO `ConcurrencyAutoIncrement` +( + `Id`, + `Stamp`, + `Value` +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 SELECT @@ -8,6 +30,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 @@ -18,6 +57,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 @@ -28,6 +84,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 @@ -38,6 +111,19 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyAutoIncrement` +WHERE + `ConcurrencyAutoIncrement`.`Id` = @Id AND `ConcurrencyAutoIncrement`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 @@ -48,6 +134,19 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -8 + +DELETE +FROM + `ConcurrencyAutoIncrement` +WHERE + `ConcurrencyAutoIncrement`.`Id` = @Id AND `ConcurrencyAutoIncrement`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySqlConnector.8.0.LinqService).sql index b77ff336f3a1..4fcad90c7558 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySqlConnector.8.0.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO `ConcurrencyFiltered` +( + `Id`, + `Stamp`, + `Value` +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 SELECT @@ -8,6 +30,23 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyFiltered` `r` +SET + `r`.`Stamp` = `r`.`Stamp` + 1, + `r`.`Value` = @Value +WHERE + `r`.`Id` = 2 AND `r`.`Id` = @Id AND `r`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 @@ -18,6 +57,23 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyFiltered` `r` +SET + `r`.`Stamp` = `r`.`Stamp` + 1, + `r`.`Value` = @Value +WHERE + `r`.`Id` = 1 AND `r`.`Id` = @Id AND `r`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 @@ -28,6 +84,20 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyFiltered` +WHERE + `ConcurrencyFiltered`.`Id` = 2 AND `ConcurrencyFiltered`.`Id` = @Id AND + `ConcurrencyFiltered`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 @@ -38,6 +108,20 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyFiltered` +WHERE + `ConcurrencyFiltered`.`Id` = 1 AND `ConcurrencyFiltered`.`Id` = @Id AND + `ConcurrencyFiltered`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..1f684b867e3b --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `Parent` `t1` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..85d8b690b8e4 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 2 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..4e32297e711f --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + `Child` `c_1` + LEFT JOIN `Parent` `a_Parent` ON `c_1`.`ParentID` = `a_Parent`.`ParentID` + WHERE + `a_Parent`.`ParentID` = `t1`.`ParentID` + )) +FROM + `Parent` `t1` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySqlConnector.8.0.LinqService).sql index 38f279bee8f3..5653ed658e01 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySqlConnector.8.0.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `DynamicParent` - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -CREATE TABLE IF NOT EXISTS `DynamicParent` -( - `ID` INT AUTO_INCREMENT NOT NULL, - - CONSTRAINT `PK_DynamicParent` PRIMARY KEY CLUSTERED (`ID`) -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `DynamicChild` - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -CREATE TABLE IF NOT EXISTS `DynamicChild` -( - `ID` INT AUTO_INCREMENT NOT NULL, - `ParentID` INT NOT NULL, - - CONSTRAINT `PK_DynamicChild` PRIMARY KEY CLUSTERED (`ID`) -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `DynamicChild` - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `DynamicParent` +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `it`.`ID` +FROM + `DynamicParent` `it` + LEFT JOIN `DynamicChild` `a_Child` ON `it`.`ID` = `a_Child`.`ParentID` +WHERE + `a_Child`.`ID` = 123 diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySqlConnector.8.0.LinqService).sql index 26314aee78f3..2c3c6d119c8e 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySqlConnector.8.0.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT + `x`.`ParentID` + FROM + `Parent` `x` + WHERE + `x`.`ParentID` = 3 + LIMIT 1 + ) `m_1` + INNER JOIN `Child` `d` ON `m_1`.`ParentID` = `d`.`ParentID` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySqlConnector.8.0.LinqService).sql index 8b1a8100af04..0608fbf2c514 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySqlConnector.8.0.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT + `x`.`ParentID` + FROM + `Parent` `x` + WHERE + `x`.`ParentID` = 3 + LIMIT 1 + ) `m_1` + INNER JOIN `Child` `d` ON `m_1`.`ParentID` = `d`.`ParentID` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..76d0512d867a --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + `Child` `a_Children` + INNER JOIN `GrandChild` `a_GrandChildren` ON `a_Children`.`ParentID` = `a_GrandChildren`.`ParentID` AND `a_Children`.`ChildID` = `a_GrandChildren`.`ChildID` + WHERE + `p`.`ParentID` = `a_Children`.`ParentID` + ) +FROM + `Parent` `p` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..2468346e2812 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` +WHERE + `t1`.`Value1` = 1 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..02f8f220e68f --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT DISTINCT + `p1`.`PersonID`, + `p1`.`Gender`, + `p1`.`FirstName`, + `p1`.`LastName` +FROM + `Person` `p1` +WHERE + `p1`.`PersonID` IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + `p1`.`Gender` = 'F' + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..441e434caa49 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + 1 as `c1` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..fc24633e007b --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `x`.`MiddleName`, + COUNT(*) +FROM + `Person` `x` +WHERE + `x`.`MiddleName` IS NOT NULL +GROUP BY + `x`.`MiddleName` +UNION ALL +SELECT + `x_1`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_1` +WHERE + `x_1`.`MiddleName` IS NOT NULL +GROUP BY + `x_1`.`MiddleName` +UNION ALL +SELECT + `x_2`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_2` +WHERE + `x_2`.`MiddleName` IS NOT NULL +GROUP BY + `x_2`.`MiddleName` +UNION ALL +SELECT + `x_3`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_3` +WHERE + `x_3`.`MiddleName` IS NOT NULL +GROUP BY + `x_3`.`MiddleName` +UNION ALL +SELECT + `x_4`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_4` +WHERE + `x_4`.`MiddleName` IS NOT NULL +GROUP BY + `x_4`.`MiddleName` +UNION ALL +SELECT + `x_5`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_5` +WHERE + `x_5`.`MiddleName` IS NOT NULL +GROUP BY + `x_5`.`MiddleName` +UNION ALL +SELECT + `x_6`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_6` +WHERE + `x_6`.`MiddleName` IS NOT NULL +GROUP BY + `x_6`.`MiddleName` +UNION ALL +SELECT + `x_7`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_7` +WHERE + `x_7`.`MiddleName` IS NOT NULL +GROUP BY + `x_7`.`MiddleName` +UNION ALL +SELECT + `x_8`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_8` +WHERE + `x_8`.`MiddleName` IS NOT NULL +GROUP BY + `x_8`.`MiddleName` +UNION ALL +SELECT + `x_9`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_9` +WHERE + `x_9`.`MiddleName` IS NOT NULL +GROUP BY + `x_9`.`MiddleName` +UNION ALL +SELECT + `x_10`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_10` +WHERE + `x_10`.`MiddleName` IS NOT NULL +GROUP BY + `x_10`.`MiddleName` +UNION ALL +SELECT + `x_11`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_11` +WHERE + `x_11`.`MiddleName` IS NOT NULL +GROUP BY + `x_11`.`MiddleName` +UNION ALL +SELECT + `x_12`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_12` +WHERE + `x_12`.`MiddleName` IS NOT NULL +GROUP BY + `x_12`.`MiddleName` +UNION ALL +SELECT + `x_13`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_13` +WHERE + `x_13`.`MiddleName` IS NOT NULL +GROUP BY + `x_13`.`MiddleName` +UNION ALL +SELECT + `x_14`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_14` +WHERE + `x_14`.`MiddleName` IS NOT NULL +GROUP BY + `x_14`.`MiddleName` +UNION ALL +SELECT + `x_15`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_15` +WHERE + `x_15`.`MiddleName` IS NOT NULL +GROUP BY + `x_15`.`MiddleName` +UNION ALL +SELECT + `x_16`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_16` +WHERE + `x_16`.`MiddleName` IS NOT NULL +GROUP BY + `x_16`.`MiddleName` +UNION ALL +SELECT + `x_17`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_17` +WHERE + `x_17`.`MiddleName` IS NOT NULL +GROUP BY + `x_17`.`MiddleName` +UNION ALL +SELECT + `x_18`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_18` +WHERE + `x_18`.`MiddleName` IS NOT NULL +GROUP BY + `x_18`.`MiddleName` +UNION ALL +SELECT + `x_19`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_19` +WHERE + `x_19`.`MiddleName` IS NOT NULL +GROUP BY + `x_19`.`MiddleName` +UNION ALL +SELECT + `x_20`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_20` +WHERE + `x_20`.`MiddleName` IS NOT NULL +GROUP BY + `x_20`.`MiddleName` + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.8.0.LinqService,False).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.8.0.LinqService,False).sql new file mode 100644 index 000000000000..c7d82557c86c --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.8.0.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.8.0.LinqService,True).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.8.0.LinqService,True).sql new file mode 100644 index 000000000000..c7d82557c86c --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.8.0.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.8.0.LinqService,False).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.8.0.LinqService,False).sql new file mode 100644 index 000000000000..c7d82557c86c --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.8.0.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.8.0.LinqService,True).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.8.0.LinqService,True).sql new file mode 100644 index 000000000000..c7d82557c86c --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.8.0.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySqlConnector.8.0.LinqService).sql index 0c35f665e42c..179f0707029e 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySqlConnector.8.0.LinqService).sql @@ -1,74 +1,13 @@ BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `TakeSkipClass` - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -CREATE TABLE IF NOT EXISTS `TakeSkipClass` -( - `Value` VARCHAR(10) NULL -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 - -DROP TABLE IF EXISTS `TakeSkipClass` +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @skip Int32 +SET @skip = 3 + +SELECT + `t1`.`Value` +FROM + `TakeSkipClass` `t1` +ORDER BY + `t1`.`Value` +LIMIT @skip, 9223372036854775807 diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.8.0.LinqService,False).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.8.0.LinqService,False).sql index f350d48e7ccd..43e2175d6084 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.8.0.LinqService,False).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.8.0.LinqService,False).sql @@ -18,3 +18,23 @@ FROM `Child` `ch` LIMIT 3 +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT 2 + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT 3 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.8.0.LinqService,True).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.8.0.LinqService,True).sql index 18052340c06b..33404f1b9c46 100644 --- a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.8.0.LinqService,True).sql +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.8.0.LinqService,True).sql @@ -22,3 +22,27 @@ FROM `Child` `ch` LIMIT @take +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @take Int32 +SET @take = 2 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT @take + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT @take + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.8.0.LinqService,False).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.8.0.LinqService,False).sql new file mode 100644 index 000000000000..53fc528d6f73 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.8.0.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @n + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.8.0.LinqService,True).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.8.0.LinqService,True).sql new file mode 100644 index 000000000000..53fc528d6f73 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.8.0.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @n + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.8.0.LinqService,False).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.8.0.LinqService,False).sql new file mode 100644 index 000000000000..7ed791fcc944 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.8.0.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` > 3 OR `ch`.`ChildID` < 4 +LIMIT 3 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.8.0.LinqService,True).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.8.0.LinqService,True).sql new file mode 100644 index 000000000000..b7971acf6996 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.8.0.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` > 3 OR `ch`.`ChildID` < 4 +LIMIT @take + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.8.0.LinqService,False).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.8.0.LinqService,False).sql new file mode 100644 index 000000000000..73098f524b64 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.8.0.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` >= 0 AND `ch`.`ChildID` <= 100 +LIMIT 3 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.8.0.LinqService,True).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.8.0.LinqService,True).sql new file mode 100644 index 000000000000..6fb09612cf85 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.8.0.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` >= 0 AND `ch`.`ChildID` <= 100 +LIMIT @take + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.8.0.LinqService,False).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.8.0.LinqService,False).sql new file mode 100644 index 000000000000..4f388d0ab9ed --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.8.0.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT 3 + diff --git a/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.8.0.LinqService,True).sql b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.8.0.LinqService,True).sql new file mode 100644 index 000000000000..71897970c346 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.8.0.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @take + diff --git a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,False,False).sql b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,False,False).sql index b35874152f5a..2aa18bf4c368 100644 --- a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,False,False).sql +++ b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,False,True).sql b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,False,True).sql index b35874152f5a..2aa18bf4c368 100644 --- a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,False,True).sql +++ b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,True,False).sql b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,True,False).sql index a2a640bf7f5a..9eea9ed3c60a 100644 --- a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,True,False).sql +++ b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE `testdataconnector`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,True,True).sql b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,True,True).sql index a2a640bf7f5a..9eea9ed3c60a 100644 --- a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,True,True).sql +++ b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,False,True,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE `testdataconnector`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,False,False).sql b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,False,False).sql index b35874152f5a..2aa18bf4c368 100644 --- a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,False,False).sql +++ b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,False,True).sql b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,False,True).sql index b35874152f5a..2aa18bf4c368 100644 --- a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,False,True).sql +++ b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,True,False).sql b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,True,False).sql index a2a640bf7f5a..9eea9ed3c60a 100644 --- a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,True,False).sql +++ b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE `testdataconnector`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,True,True).sql b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,True,True).sql index a2a640bf7f5a..9eea9ed3c60a 100644 --- a/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,True,True).sql +++ b/MySqlConnector.8.0.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.8.0.LinqService,True,True,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE `testdataconnector`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..02ae89daec81 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `TestTable` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE `TestTable` +( + `ID` INT AUTO_INCREMENT NOT NULL, + `Field1` VARCHAR(50) NULL, + `Field2` VARCHAR(4000) NULL, + `CreatedOn` DATETIME NULL, + + CONSTRAINT `PK_TestTable` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ID`, + `t1`.`Field1`, + `t1`.`Field2`, + `t1`.`CreatedOn` +FROM + `TestTable` `t1` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE `TestTable` + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySqlConnector.8.0.LinqService).sql index 7cf34cb264a3..90832578c1d9 100644 --- a/MySqlConnector.8.0.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySqlConnector.8.0.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `TempTable` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE IF NOT EXISTS `TempTable` +( + `ID` INT NOT NULL +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +INSERT INTO `TempTable` +( + `ID` +) +SELECT + `p`.`ParentID` +FROM + `Parent` `p` + +BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 SELECT @@ -7,3 +32,8 @@ FROM `Parent` `p` INNER JOIN `TempTable` `t` ON `p`.`ParentID` = `t`.`ID` +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `TempTable` + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..d7f90ea61186 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +DELETE +FROM + `xxPerson` +WHERE + `xxPerson`.`PersonID` = @ID + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE `xxPerson` + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..65570cc2e8aa --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..82c652a22a9b --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +SELECT + `c_1`.`ParentID`, + @id +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = 11 + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..82c652a22a9b --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +SELECT + `c_1`.`ParentID`, + @id +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = 11 + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySqlConnector.8.0.LinqService).sql index 992a40d5e803..d732f8fee73c 100644 --- a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySqlConnector.8.0.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) DECLARE @FirstName VarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName VarChar(4) -- String @@ -60,3 +100,32 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `p` +WHERE + `p`.`FirstName` = 'Steven' AND `p`.`LastName` = 'King' AND + `p`.`Gender` = 'M' + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE `xxPerson` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySqlConnector.8.0.LinqService).sql index a3bda87ba794..f770c7dffde5 100644 --- a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySqlConnector.8.0.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..2fb32f48a76f --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `xxPatient` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE `xxPatient` +( + `PersonID` INT NOT NULL, + `Diagnosis` VARCHAR(4000) NULL, + + CONSTRAINT `PK_xxPatient` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPatient` `t1` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPatient` `t1` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `xxPatient` + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySqlConnector.8.0.LinqService).sql index a3bda87ba794..eb1e158915f8 100644 --- a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySqlConnector.8.0.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySqlConnector.8.0.LinqService).sql index a3bda87ba794..eb1e158915f8 100644 --- a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySqlConnector.8.0.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySqlConnector.8.0.LinqService).sql index aaf1241d3c3d..70b46447e797 100644 --- a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySqlConnector.8.0.LinqService).sql @@ -28,6 +28,21 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = 'John' AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySqlConnector.8.0.LinqService).sql index aaf1241d3c3d..70b46447e797 100644 --- a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySqlConnector.8.0.LinqService).sql @@ -28,6 +28,21 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = 'John' AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySqlConnector.8.0.LinqService).sql index 466663906139..6c4707d49138 100644 --- a/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySqlConnector.8.0.LinqService).sql @@ -38,6 +38,23 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John0' + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = @p AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) DECLARE @FirstName VarChar(5) -- String @@ -69,6 +86,23 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John1' + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = @p AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..9c23b9da05c2 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +UPDATE + `Parent` `p1` + INNER JOIN `Parent` `p2` ON `p1`.`ParentID` = `p2`.`ParentID` +SET + `p1`.`ParentID` = `p2`.`ParentID` +WHERE + `p1`.`ParentID` < 3 + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..9eca9a296fd9 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + `Parent` `p` +SET + `p`.`ParentID` = `p`.`ParentID` + 1 +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @p + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..9eca9a296fd9 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + `Parent` `p` +SET + `p`.`ParentID` = `p`.`ParentID` + 1 +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @p + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..6e6985f890e1 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,53 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +UPDATE + `Child` `c_1` + LEFT JOIN `Parent` `a_Parent` ON `c_1`.`ParentID` = `a_Parent`.`ParentID` +SET + `c_1`.`ChildID` = `c_1`.`ChildID` + 1 +WHERE + `c_1`.`ChildID` = @id AND `a_Parent`.`Value1` = 1 + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @p + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..3938d832bf1b --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +INSERT INTO `Child` +( + `ChildID`, + `ParentID` +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +UPDATE + `Parent` `a_Parent`, + `Child` `child_1` +SET + `a_Parent`.`Value1` = 5 +WHERE + `child_1`.`ChildID` = 10000 AND `child_1`.`ParentID` = `a_Parent`.`ParentID` + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..3938d832bf1b --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +INSERT INTO `Child` +( + `ChildID`, + `ParentID` +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +UPDATE + `Parent` `a_Parent`, + `Child` `child_1` +SET + `a_Parent`.`Value1` = 5 +WHERE + `child_1`.`ChildID` = 10000 AND `child_1`.`ParentID` = `a_Parent`.`ParentID` + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySqlConnector.8.0.LinqService).sql new file mode 100644 index 000000000000..2d44b7430304 --- /dev/null +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySqlConnector.8.0.LinqService).sql @@ -0,0 +1,107 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Int32 +SET @ID = 1 + +UPDATE + `xxPerson` `t1` +SET + `t1`.`FirstName` = @FirstName, + `t1`.`LastName` = @LastName, + `t1`.`MiddleName` = @MiddleName, + `t1`.`Gender` = @Gender +WHERE + `t1`.`PersonID` = @ID + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +DROP TABLE `xxPerson` + diff --git a/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySqlConnector.8.0.LinqService).sql b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySqlConnector.8.0.LinqService).sql index 9a427c2ea831..c677939c9722 100644 --- a/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySqlConnector.8.0.LinqService).sql +++ b/MySqlConnector.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySqlConnector.8.0.LinqService).sql @@ -34,3 +34,60 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `t1`.`PersonID`, + `t1`.`Gender`, + `t1`.`FirstName`, + `t1`.`MiddleName`, + `t1`.`LastName` +FROM + `Person` `t1` +WHERE + `t1`.`PersonID` = @id +LIMIT 1 + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @Gender String(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName VarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName VarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName VarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int32 +SET @ID = 5 + +UPDATE + `Person` `t1` +SET + `t1`.`Gender` = @Gender, + `t1`.`FirstName` = @Name_FirstName, + `t1`.`MiddleName` = @Name_MiddleName, + `t1`.`LastName` = @Name_LastName +WHERE + `t1`.`PersonID` = @ID + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `t1`.`PersonID`, + `t1`.`Gender`, + `t1`.`FirstName`, + `t1`.`MiddleName`, + `t1`.`LastName` +FROM + `Person` `t1` +WHERE + `t1`.`PersonID` = @id +LIMIT 1 + diff --git a/MySqlConnector.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySqlConnector.8.0).sql b/MySqlConnector.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySqlConnector.8.0).sql new file mode 100644 index 000000000000..617e04488847 --- /dev/null +++ b/MySqlConnector.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySqlConnector.8.0).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySqlConnector.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySqlConnector.8.0).sql b/MySqlConnector.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySqlConnector.8.0).sql new file mode 100644 index 000000000000..4141358b0a0d --- /dev/null +++ b/MySqlConnector.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySqlConnector.8.0).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySqlConnector.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySqlConnector.8.0).sql b/MySqlConnector.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySqlConnector.8.0).sql new file mode 100644 index 000000000000..4141358b0a0d --- /dev/null +++ b/MySqlConnector.8.0/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySqlConnector.8.0).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySqlConnector.8.0 MySql.8.0.MySqlConnector MySql80 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + From 718577d299d9a01272c806ff78febb68071d7367 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:53:58 +0000 Subject: [PATCH 17/40] [Linux / MySQL 5.7 (both providers)] baselines --- ...Tests.All4Async(MySql.5.7.LinqService).sql | 13 ++ ...s.GroupBy2Async(MySql.5.7.LinqService).sql | 30 +++ ...Enumerable1Test(MySql.5.7.LinqService).sql | 9 + ...Enumerable2Test(MySql.5.7.LinqService).sql | 11 + ...erableCast1Test(MySql.5.7.LinqService).sql | 9 + ...erableCast2Test(MySql.5.7.LinqService).sql | 11 + ...ntainsAsyncTest(MySql.5.7.LinqService).sql | 17 ++ ....FirstAsyncTest(MySql.5.7.LinqService).sql | 15 ++ ...ts.TakeSkipTest(MySql.5.7.LinqService).sql | 16 ++ ...tFirstOrDefault(MySql.5.7.LinqService).sql | 20 ++ ...LookupAsyncTest(MySql.5.7.LinqService).sql | 21 ++ ...lementAsyncTest(MySql.5.7.LinqService).sql | 21 ++ ...ts.AnyTestAsync(MySql.5.7.LinqService).sql | 30 +++ ...s.AnyTestAsync2(MySql.5.7.LinqService).sql | 30 +++ ...MethoAsyncdTest(MySql.5.7.LinqService).sql | 16 ++ ...piledTest3Async(MySql.5.7.LinqService).sql | 28 +++ ...ntainsTestAsync(MySql.5.7.LinqService).sql | 34 +++ ....CountTestAsync(MySql.5.7.LinqService).sql | 24 ++ ...CountTestAsync2(MySql.5.7.LinqService).sql | 24 ++ ...ementTestAsync1(MySql.5.7.LinqService).sql | 28 +++ ...ementTestAsync2(MySql.5.7.LinqService).sql | 28 +++ ...ts.MaxTestAsync(MySql.5.7.LinqService).sql | 24 ++ ...s.MaxTestAsync2(MySql.5.7.LinqService).sql | 24 ++ ...yPredicateAsync(MySql.5.7.LinqService).sql | 171 ++------------ ...tPredicateAsync(MySql.5.7.LinqService).sql | 168 +------------- ...tPredicateAsync(MySql.5.7.LinqService).sql | 170 +------------- ...tPredicateAsync(MySql.5.7.LinqService).sql | 170 +------------- ...tPredicateAsync(MySql.5.7.LinqService).sql | 168 +------------- ...axSelectorAsync(MySql.5.7.LinqService).sql | 168 +------------- ...inSelectorAsync(MySql.5.7.LinqService).sql | 168 +------------- ...tPredicateAsync(MySql.5.7.LinqService).sql | 170 +------------- ...ePredicateAsync(MySql.5.7.LinqService).sql | 170 +------------- ...ts.Concat1Async(MySql.5.7.LinqService).sql | 19 ++ ...oIncrementAsync(MySql.5.7.LinqService).sql | 99 ++++++++ ...stFilteredAsync(MySql.5.7.LinqService).sql | 84 +++++++ ...sts.Count1Async(MySql.5.7.LinqService).sql | 8 + ...sts.Count2Async(MySql.5.7.LinqService).sql | 10 + ...bQueryMax1Async(MySql.5.7.LinqService).sql | 16 ++ ...Tests.Issue4602(MySql.5.7.LinqService).sql | 48 +--- ...Issue4057_Async(MySql.5.7.LinqService).sql | 31 +++ ...icitTransaction(MySql.5.7.LinqService).sql | 31 +++ ...ExpressionAsync(MySql.5.7.LinqService).sql | 25 ++ ...ests.Cast1Async(MySql.5.7.LinqService).sql | 11 + ...sts.Test18Async(MySql.5.7.LinqService).sql | 14 ++ ...Parameter1Async(MySql.5.7.LinqService).sql | 6 + ...s.Issue3132Test(MySql.5.7.LinqService).sql | 213 ++++++++++++++++++ ...tAt2Async(MySql.5.7.LinqService,False).sql | 16 ++ ...ntAt2Async(MySql.5.7.LinqService,True).sql | 16 ++ ...ult3Async(MySql.5.7.LinqService,False).sql | 16 ++ ...ault3Async(MySql.5.7.LinqService,True).sql | 16 ++ ...tipleSkip1Async(MySql.5.7.LinqService).sql | 83 +------ ...ake1Async(MySql.5.7.LinqService,False).sql | 20 ++ ...Take1Async(MySql.5.7.LinqService,True).sql | 24 ++ ...ake2Async(MySql.5.7.LinqService,False).sql | 12 + ...Take2Async(MySql.5.7.LinqService,True).sql | 12 + ...ake3Async(MySql.5.7.LinqService,False).sql | 12 + ...Take3Async(MySql.5.7.LinqService,True).sql | 14 ++ ...ake4Async(MySql.5.7.LinqService,False).sql | 12 + ...Take4Async(MySql.5.7.LinqService,True).sql | 14 ++ ...ake5Async(MySql.5.7.LinqService,False).sql | 10 + ...Take5Async(MySql.5.7.LinqService,True).sql | 12 + ...Sql.5.7.LinqService,False,False,False).sql | 16 ++ ...ySql.5.7.LinqService,False,False,True).sql | 16 ++ ...ySql.5.7.LinqService,False,True,False).sql | 16 ++ ...MySql.5.7.LinqService,False,True,True).sql | 16 ++ ...ySql.5.7.LinqService,True,False,False).sql | 16 ++ ...MySql.5.7.LinqService,True,False,True).sql | 16 ++ ...MySql.5.7.LinqService,True,True,False).sql | 16 ++ ...(MySql.5.7.LinqService,True,True,True).sql | 16 ++ ...eateTable1Async(MySql.5.7.LinqService).sql | 34 +++ ...reateTableAsync(MySql.5.7.LinqService).sql | 30 +++ ...yTableNameAsync(MySql.5.7.LinqService).sql | 90 ++++++++ ...ts.Insert2Async(MySql.5.7.LinqService).sql | 46 ++++ ...ts.Insert3Async(MySql.5.7.LinqService).sql | 48 ++++ ...ts.Insert4Async(MySql.5.7.LinqService).sql | 48 ++++ ...yTableNameAsync(MySql.5.7.LinqService).sql | 69 ++++++ ...OrReplace1Async(MySql.5.7.LinqService).sql | 74 ++++++ ...yTableNameAsync(MySql.5.7.LinqService).sql | 117 ++++++++++ ...tOrUpdate3Async(MySql.5.7.LinqService).sql | 74 ++++++ ...OrUpdate3xAsync(MySql.5.7.LinqService).sql | 74 ++++++ ...hIdentity1Async(MySql.5.7.LinqService).sql | 15 ++ ...hIdentity2Async(MySql.5.7.LinqService).sql | 15 ++ ...hIdentity4Async(MySql.5.7.LinqService).sql | 34 +++ ...s.Update12Async(MySql.5.7.LinqService).sql | 11 + ...ts.Update1Async(MySql.5.7.LinqService).sql | 54 +++++ ...ts.Update2Async(MySql.5.7.LinqService).sql | 54 +++++ ...ts.Update4Async(MySql.5.7.LinqService).sql | 53 +++++ ...sociation1Async(MySql.5.7.LinqService).sql | 39 ++++ ...iation1AsyncOld(MySql.5.7.LinqService).sql | 39 ++++ ...yTableNameAsync(MySql.5.7.LinqService).sql | 107 +++++++++ ...teComplex1Async(MySql.5.7.LinqService).sql | 57 +++++ .../Tests.Linq.AsyncTests.Test(MySql.5.7).sql | 18 ++ ...Tests.Linq.AsyncTests.Test1(MySql.5.7).sql | 9 + ...Linq.AsyncTests.TestForEach(MySql.5.7).sql | 9 + ...4Async(MySqlConnector.5.7.LinqService).sql | 13 ++ ...2Async(MySqlConnector.5.7.LinqService).sql | 30 +++ ...e1Test(MySqlConnector.5.7.LinqService).sql | 9 + ...e2Test(MySqlConnector.5.7.LinqService).sql | 11 + ...t1Test(MySqlConnector.5.7.LinqService).sql | 9 + ...t2Test(MySqlConnector.5.7.LinqService).sql | 11 + ...ncTest(MySqlConnector.5.7.LinqService).sql | 17 ++ ...ncTest(MySqlConnector.5.7.LinqService).sql | 15 ++ ...ipTest(MySqlConnector.5.7.LinqService).sql | 16 ++ ...efault(MySqlConnector.5.7.LinqService).sql | 20 ++ ...ncTest(MySqlConnector.5.7.LinqService).sql | 21 ++ ...ncTest(MySqlConnector.5.7.LinqService).sql | 21 ++ ...tAsync(MySqlConnector.5.7.LinqService).sql | 30 +++ ...Async2(MySqlConnector.5.7.LinqService).sql | 30 +++ ...cdTest(MySqlConnector.5.7.LinqService).sql | 16 ++ ...3Async(MySqlConnector.5.7.LinqService).sql | 28 +++ ...tAsync(MySqlConnector.5.7.LinqService).sql | 34 +++ ...tAsync(MySqlConnector.5.7.LinqService).sql | 24 ++ ...Async2(MySqlConnector.5.7.LinqService).sql | 24 ++ ...Async1(MySqlConnector.5.7.LinqService).sql | 28 +++ ...Async2(MySqlConnector.5.7.LinqService).sql | 28 +++ ...tAsync(MySqlConnector.5.7.LinqService).sql | 24 ++ ...Async2(MySqlConnector.5.7.LinqService).sql | 24 ++ ...eAsync(MySqlConnector.5.7.LinqService).sql | 171 ++------------ ...eAsync(MySqlConnector.5.7.LinqService).sql | 168 +------------- ...eAsync(MySqlConnector.5.7.LinqService).sql | 170 +------------- ...eAsync(MySqlConnector.5.7.LinqService).sql | 170 +------------- ...eAsync(MySqlConnector.5.7.LinqService).sql | 168 +------------- ...rAsync(MySqlConnector.5.7.LinqService).sql | 168 +------------- ...rAsync(MySqlConnector.5.7.LinqService).sql | 168 +------------- ...eAsync(MySqlConnector.5.7.LinqService).sql | 170 +------------- ...eAsync(MySqlConnector.5.7.LinqService).sql | 170 +------------- ...1Async(MySqlConnector.5.7.LinqService).sql | 19 ++ ...tAsync(MySqlConnector.5.7.LinqService).sql | 99 ++++++++ ...dAsync(MySqlConnector.5.7.LinqService).sql | 84 +++++++ ...1Async(MySqlConnector.5.7.LinqService).sql | 8 + ...2Async(MySqlConnector.5.7.LinqService).sql | 10 + ...1Async(MySqlConnector.5.7.LinqService).sql | 16 ++ ...ue4602(MySqlConnector.5.7.LinqService).sql | 48 +--- ..._Async(MySqlConnector.5.7.LinqService).sql | 31 +++ ...action(MySqlConnector.5.7.LinqService).sql | 31 +++ ...nAsync(MySqlConnector.5.7.LinqService).sql | 25 ++ ...1Async(MySqlConnector.5.7.LinqService).sql | 11 + ...8Async(MySqlConnector.5.7.LinqService).sql | 14 ++ ...1Async(MySqlConnector.5.7.LinqService).sql | 6 + ...32Test(MySqlConnector.5.7.LinqService).sql | 213 ++++++++++++++++++ ...(MySqlConnector.5.7.LinqService,False).sql | 16 ++ ...c(MySqlConnector.5.7.LinqService,True).sql | 16 ++ ...(MySqlConnector.5.7.LinqService,False).sql | 16 ++ ...c(MySqlConnector.5.7.LinqService,True).sql | 16 ++ ...1Async(MySqlConnector.5.7.LinqService).sql | 83 +------ ...(MySqlConnector.5.7.LinqService,False).sql | 20 ++ ...c(MySqlConnector.5.7.LinqService,True).sql | 24 ++ ...(MySqlConnector.5.7.LinqService,False).sql | 12 + ...c(MySqlConnector.5.7.LinqService,True).sql | 12 + ...(MySqlConnector.5.7.LinqService,False).sql | 12 + ...c(MySqlConnector.5.7.LinqService,True).sql | 14 ++ ...(MySqlConnector.5.7.LinqService,False).sql | 12 + ...c(MySqlConnector.5.7.LinqService,True).sql | 14 ++ ...(MySqlConnector.5.7.LinqService,False).sql | 10 + ...c(MySqlConnector.5.7.LinqService,True).sql | 12 + ...tor.5.7.LinqService,False,False,False).sql | 16 ++ ...ctor.5.7.LinqService,False,False,True).sql | 16 ++ ...ctor.5.7.LinqService,False,True,False).sql | 16 ++ ...ector.5.7.LinqService,False,True,True).sql | 16 ++ ...ctor.5.7.LinqService,True,False,False).sql | 16 ++ ...ector.5.7.LinqService,True,False,True).sql | 16 ++ ...ector.5.7.LinqService,True,True,False).sql | 16 ++ ...nector.5.7.LinqService,True,True,True).sql | 16 ++ ...1Async(MySqlConnector.5.7.LinqService).sql | 34 +++ ...eAsync(MySqlConnector.5.7.LinqService).sql | 30 +++ ...eAsync(MySqlConnector.5.7.LinqService).sql | 90 ++++++++ ...2Async(MySqlConnector.5.7.LinqService).sql | 46 ++++ ...3Async(MySqlConnector.5.7.LinqService).sql | 48 ++++ ...4Async(MySqlConnector.5.7.LinqService).sql | 48 ++++ ...eAsync(MySqlConnector.5.7.LinqService).sql | 69 ++++++ ...1Async(MySqlConnector.5.7.LinqService).sql | 74 ++++++ ...eAsync(MySqlConnector.5.7.LinqService).sql | 117 ++++++++++ ...3Async(MySqlConnector.5.7.LinqService).sql | 74 ++++++ ...xAsync(MySqlConnector.5.7.LinqService).sql | 74 ++++++ ...1Async(MySqlConnector.5.7.LinqService).sql | 15 ++ ...2Async(MySqlConnector.5.7.LinqService).sql | 15 ++ ...4Async(MySqlConnector.5.7.LinqService).sql | 34 +++ ...2Async(MySqlConnector.5.7.LinqService).sql | 11 + ...1Async(MySqlConnector.5.7.LinqService).sql | 54 +++++ ...2Async(MySqlConnector.5.7.LinqService).sql | 54 +++++ ...4Async(MySqlConnector.5.7.LinqService).sql | 53 +++++ ...1Async(MySqlConnector.5.7.LinqService).sql | 39 ++++ ...yncOld(MySqlConnector.5.7.LinqService).sql | 39 ++++ ...eAsync(MySqlConnector.5.7.LinqService).sql | 107 +++++++++ ...1Async(MySqlConnector.5.7.LinqService).sql | 57 +++++ ...nq.AsyncTests.Test(MySqlConnector.5.7).sql | 18 ++ ...q.AsyncTests.Test1(MySqlConnector.5.7).sql | 9 + ...cTests.TestForEach(MySqlConnector.5.7).sql | 9 + 188 files changed, 5446 insertions(+), 3066 deletions(-) create mode 100644 MySql.5.7.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.5.7.LinqService,False).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.5.7.LinqService,True).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.5.7.LinqService,False).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.5.7.LinqService,True).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.5.7.LinqService,False).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.5.7.LinqService,True).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.5.7.LinqService,False).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.5.7.LinqService,True).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.5.7.LinqService,False).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.5.7.LinqService,True).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.5.7.LinqService,False).sql create mode 100644 MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.5.7.LinqService,True).sql create mode 100644 MySql.5.7.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySql.5.7.LinqService).sql create mode 100644 MySql.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySql.5.7).sql create mode 100644 MySql.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySql.5.7).sql create mode 100644 MySql.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySql.5.7).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.5.7.LinqService,False).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.5.7.LinqService,True).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.5.7.LinqService,False).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.5.7.LinqService,True).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.5.7.LinqService,False).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.5.7.LinqService,True).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.5.7.LinqService,False).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.5.7.LinqService,True).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.5.7.LinqService,False).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.5.7.LinqService,True).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.5.7.LinqService,False).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.5.7.LinqService,True).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySqlConnector.5.7.LinqService).sql create mode 100644 MySqlConnector.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySqlConnector.5.7).sql create mode 100644 MySqlConnector.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySqlConnector.5.7).sql create mode 100644 MySqlConnector.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySqlConnector.5.7).sql diff --git a/MySql.5.7.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..10f2ea90a757 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySql.5.7.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` <= 3 + ) as `c1` + diff --git a/MySql.5.7.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..229672799360 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySql.5.7.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT DISTINCT + `a_Parent1`.`ParentID` + FROM + `Child` `t1` + INNER JOIN `Parent` `a_Parent1` ON `t1`.`ParentID` = `a_Parent1`.`ParentID` + ) `m_1` + INNER JOIN (`Child` `d` + INNER JOIN `Parent` `a_Parent1_1` ON `d`.`ParentID` = `a_Parent1_1`.`ParentID`) + ON `m_1`.`ParentID` = `a_Parent1_1`.`ParentID` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `a_Parent1`.`ParentID` +FROM + `Child` `t1` + INNER JOIN `Parent` `a_Parent1` ON `t1`.`ParentID` = `a_Parent1`.`ParentID` +GROUP BY + `a_Parent1`.`ParentID` + diff --git a/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..20deebe32d41 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySql.5.7.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..c07feaae66c7 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySql.5.7.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` > 1 + diff --git a/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..20deebe32d41 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySql.5.7.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..c07feaae66c7 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySql.5.7.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` > 1 + diff --git a/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..e6440e1920b2 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySql.5.7.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + `t1`.`PersonID` + FROM + `Person` `t1` + ) + THEN 1 + ELSE 0 + END as `c1` + diff --git a/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..2dc8de61429c --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySql.5.7.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`PersonID` = 1 +LIMIT 1 + diff --git a/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySql.5.7.LinqService).sql index 9d20d9575a25..258c96034ffc 100644 --- a/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySql.5.7.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY `t1`.`ParentID` LIMIT @skip, @take +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @skip Int32 +SET @skip = 1 +DECLARE @take Int32 +SET @take = 2 + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` +ORDER BY + `t1`.`ParentID` +LIMIT @skip, @take + diff --git a/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..56e42eddc1bc --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySql.5.7.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 +DECLARE @p_1 Int32 +SET @p_1 = 2 +DECLARE @p_2 Int32 +SET @p_2 = 3 +DECLARE @param Int32 +SET @param = 4 + +SELECT + `o`.`ParentID`, + `o`.`Value1` +FROM + `Parent` `o` +WHERE + `o`.`ParentID` IN (@p, @p_1, @p_2) OR `o`.`ParentID` = @param +LIMIT 1 + diff --git a/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..ddc6fa4285e0 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySql.5.7.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +ORDER BY + `t1`.`ParentID`, + `t1`.`ChildID` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` + diff --git a/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..ddc6fa4285e0 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySql.5.7.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +ORDER BY + `t1`.`ParentID`, + `t1`.`ChildID` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` + diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..5162f7d9574f --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySql.5.7.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..5162f7d9574f --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySql.5.7.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..6e809d7a3925 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySql.5.7.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = @p +ORDER BY + `x`.`ParentID` DESC +LIMIT 1 + diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..5a4dd23c6f26 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySql.5.7.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT @p + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT @p + diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..d801fb0c0f3f --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySql.5.7.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + `c_1`.`ParentID` + FROM + `Child` `c_1` + ) + THEN 1 + ELSE 0 + END as `c1` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + `c_1`.`ParentID` + FROM + `Child` `c_1` + ) + THEN 1 + ELSE 0 + END as `c1` + diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..6563dd5588c1 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySql.5.7.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..6563dd5588c1 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySql.5.7.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..e68287c5f8dc --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySql.5.7.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..e68287c5f8dc --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySql.5.7.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..05436949d58e --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySql.5.7.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..05436949d58e --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySql.5.7.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySql.5.7.LinqService).sql index ae56151039d4..d51c431b773d 100644 --- a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySql.5.7.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + `AsyncDataTable` `c_1` + WHERE + `c_1`.`Id` = @p + ) as `c1` diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySql.5.7.LinqService).sql index ae56151039d4..13510ef2e071 100644 --- a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySql.5.7.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySql.5.7.LinqService).sql index ae56151039d4..578109ded4d6 100644 --- a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySql.5.7.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 1 diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySql.5.7.LinqService).sql index ae56151039d4..578109ded4d6 100644 --- a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySql.5.7.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 1 diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySql.5.7.LinqService).sql index ae56151039d4..13510ef2e071 100644 --- a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySql.5.7.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySql.5.7.LinqService).sql index ae56151039d4..66ebe7184a94 100644 --- a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySql.5.7.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MAX(`c_1`.`Id`) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` > @p diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySql.5.7.LinqService).sql index ae56151039d4..e3c10b8a4e9b 100644 --- a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySql.5.7.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MIN(`c_1`.`Id`) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` > @p diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySql.5.7.LinqService).sql index ae56151039d4..fd932090bf7f 100644 --- a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySql.5.7.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 2 diff --git a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySql.5.7.LinqService).sql index ae56151039d4..fd932090bf7f 100644 --- a/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySql.5.7.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 2 diff --git a/MySql.5.7.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..e3081993b1da --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySql.5.7.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = 1 +UNION ALL +SELECT + `p_1`.`ParentID`, + `p_1`.`Value1` +FROM + `Parent` `p_1` +WHERE + `p_1`.`ParentID` = 2 + diff --git a/MySql.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySql.5.7.LinqService).sql index d70cc9e5e3ec..6ef354d473d3 100644 --- a/MySql.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySql.5.7.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO `ConcurrencyAutoIncrement` +( + `Id`, + `Stamp`, + `Value` +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 SELECT @@ -8,6 +30,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 @@ -18,6 +57,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 @@ -28,6 +84,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 @@ -38,6 +111,19 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyAutoIncrement` +WHERE + `ConcurrencyAutoIncrement`.`Id` = @Id AND `ConcurrencyAutoIncrement`.`Stamp` = @Stamp + BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 @@ -48,6 +134,19 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -8 + +DELETE +FROM + `ConcurrencyAutoIncrement` +WHERE + `ConcurrencyAutoIncrement`.`Id` = @Id AND `ConcurrencyAutoIncrement`.`Stamp` = @Stamp + BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 diff --git a/MySql.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySql.5.7.LinqService).sql index ef5fc9f778b1..e374d13dc817 100644 --- a/MySql.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySql.5.7.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO `ConcurrencyFiltered` +( + `Id`, + `Stamp`, + `Value` +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 SELECT @@ -8,6 +30,23 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyFiltered` `r` +SET + `r`.`Stamp` = `r`.`Stamp` + 1, + `r`.`Value` = @Value +WHERE + `r`.`Id` = 2 AND `r`.`Id` = @Id AND `r`.`Stamp` = @Stamp + BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 @@ -18,6 +57,23 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyFiltered` `r` +SET + `r`.`Stamp` = `r`.`Stamp` + 1, + `r`.`Value` = @Value +WHERE + `r`.`Id` = 1 AND `r`.`Id` = @Id AND `r`.`Stamp` = @Stamp + BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 @@ -28,6 +84,20 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyFiltered` +WHERE + `ConcurrencyFiltered`.`Id` = 2 AND `ConcurrencyFiltered`.`Id` = @Id AND + `ConcurrencyFiltered`.`Stamp` = @Stamp + BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 @@ -38,6 +108,20 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyFiltered` +WHERE + `ConcurrencyFiltered`.`Id` = 1 AND `ConcurrencyFiltered`.`Id` = @Id AND + `ConcurrencyFiltered`.`Stamp` = @Stamp + BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 diff --git a/MySql.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..4b5379e40655 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySql.5.7.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `Parent` `t1` + diff --git a/MySql.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..4514b35e3ba7 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySql.5.7.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 2 + diff --git a/MySql.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..a0108a31199c --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySql.5.7.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + `Child` `c_1` + LEFT JOIN `Parent` `a_Parent` ON `c_1`.`ParentID` = `a_Parent`.`ParentID` + WHERE + `a_Parent`.`ParentID` = `t1`.`ParentID` + )) +FROM + `Parent` `t1` + diff --git a/MySql.5.7.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySql.5.7.LinqService).sql index f902c39e691c..911e24df80a8 100644 --- a/MySql.5.7.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySql.5.7.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `DynamicParent` - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -CREATE TABLE IF NOT EXISTS `DynamicParent` -( - `ID` INT AUTO_INCREMENT NOT NULL, - - CONSTRAINT `PK_DynamicParent` PRIMARY KEY CLUSTERED (`ID`) -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `DynamicChild` - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -CREATE TABLE IF NOT EXISTS `DynamicChild` -( - `ID` INT AUTO_INCREMENT NOT NULL, - `ParentID` INT NOT NULL, - - CONSTRAINT `PK_DynamicChild` PRIMARY KEY CLUSTERED (`ID`) -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `DynamicChild` - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `DynamicParent` +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `it`.`ID` +FROM + `DynamicParent` `it` + LEFT JOIN `DynamicChild` `a_Child` ON `it`.`ID` = `a_Child`.`ParentID` +WHERE + `a_Child`.`ID` = 123 diff --git a/MySql.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySql.5.7.LinqService).sql index c6fe6e7dc81c..06bdf2b9372a 100644 --- a/MySql.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySql.5.7.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT + `x`.`ParentID` + FROM + `Parent` `x` + WHERE + `x`.`ParentID` = 3 + LIMIT 1 + ) `m_1` + INNER JOIN `Child` `d` ON `m_1`.`ParentID` = `d`.`ParentID` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) diff --git a/MySql.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySql.5.7.LinqService).sql index 3d86b201ac7d..870790b249c1 100644 --- a/MySql.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySql.5.7.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT + `x`.`ParentID` + FROM + `Parent` `x` + WHERE + `x`.`ParentID` = 3 + LIMIT 1 + ) `m_1` + INNER JOIN `Child` `d` ON `m_1`.`ParentID` = `d`.`ParentID` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) diff --git a/MySql.5.7.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..4b61b3986e1f --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySql.5.7.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + `Child` `a_Children` + INNER JOIN `GrandChild` `a_GrandChildren` ON `a_Children`.`ParentID` = `a_GrandChildren`.`ParentID` AND `a_Children`.`ChildID` = `a_GrandChildren`.`ChildID` + WHERE + `p`.`ParentID` = `a_Children`.`ParentID` + ) +FROM + `Parent` `p` + diff --git a/MySql.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..ddf6e720ec07 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySql.5.7.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` +WHERE + `t1`.`Value1` = 1 + diff --git a/MySql.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..25391ec9f3b0 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySql.5.7.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT DISTINCT + `p1`.`PersonID`, + `p1`.`Gender`, + `p1`.`FirstName`, + `p1`.`LastName` +FROM + `Person` `p1` +WHERE + `p1`.`PersonID` IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + `p1`.`Gender` = 'F' + diff --git a/MySql.5.7.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..7c87174c999b --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySql.5.7.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + 1 as `c1` + diff --git a/MySql.5.7.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..5434e36e9b8d --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySql.5.7.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `x`.`MiddleName`, + COUNT(*) +FROM + `Person` `x` +WHERE + `x`.`MiddleName` IS NOT NULL +GROUP BY + `x`.`MiddleName` +UNION ALL +SELECT + `x_1`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_1` +WHERE + `x_1`.`MiddleName` IS NOT NULL +GROUP BY + `x_1`.`MiddleName` +UNION ALL +SELECT + `x_2`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_2` +WHERE + `x_2`.`MiddleName` IS NOT NULL +GROUP BY + `x_2`.`MiddleName` +UNION ALL +SELECT + `x_3`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_3` +WHERE + `x_3`.`MiddleName` IS NOT NULL +GROUP BY + `x_3`.`MiddleName` +UNION ALL +SELECT + `x_4`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_4` +WHERE + `x_4`.`MiddleName` IS NOT NULL +GROUP BY + `x_4`.`MiddleName` +UNION ALL +SELECT + `x_5`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_5` +WHERE + `x_5`.`MiddleName` IS NOT NULL +GROUP BY + `x_5`.`MiddleName` +UNION ALL +SELECT + `x_6`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_6` +WHERE + `x_6`.`MiddleName` IS NOT NULL +GROUP BY + `x_6`.`MiddleName` +UNION ALL +SELECT + `x_7`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_7` +WHERE + `x_7`.`MiddleName` IS NOT NULL +GROUP BY + `x_7`.`MiddleName` +UNION ALL +SELECT + `x_8`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_8` +WHERE + `x_8`.`MiddleName` IS NOT NULL +GROUP BY + `x_8`.`MiddleName` +UNION ALL +SELECT + `x_9`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_9` +WHERE + `x_9`.`MiddleName` IS NOT NULL +GROUP BY + `x_9`.`MiddleName` +UNION ALL +SELECT + `x_10`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_10` +WHERE + `x_10`.`MiddleName` IS NOT NULL +GROUP BY + `x_10`.`MiddleName` +UNION ALL +SELECT + `x_11`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_11` +WHERE + `x_11`.`MiddleName` IS NOT NULL +GROUP BY + `x_11`.`MiddleName` +UNION ALL +SELECT + `x_12`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_12` +WHERE + `x_12`.`MiddleName` IS NOT NULL +GROUP BY + `x_12`.`MiddleName` +UNION ALL +SELECT + `x_13`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_13` +WHERE + `x_13`.`MiddleName` IS NOT NULL +GROUP BY + `x_13`.`MiddleName` +UNION ALL +SELECT + `x_14`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_14` +WHERE + `x_14`.`MiddleName` IS NOT NULL +GROUP BY + `x_14`.`MiddleName` +UNION ALL +SELECT + `x_15`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_15` +WHERE + `x_15`.`MiddleName` IS NOT NULL +GROUP BY + `x_15`.`MiddleName` +UNION ALL +SELECT + `x_16`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_16` +WHERE + `x_16`.`MiddleName` IS NOT NULL +GROUP BY + `x_16`.`MiddleName` +UNION ALL +SELECT + `x_17`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_17` +WHERE + `x_17`.`MiddleName` IS NOT NULL +GROUP BY + `x_17`.`MiddleName` +UNION ALL +SELECT + `x_18`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_18` +WHERE + `x_18`.`MiddleName` IS NOT NULL +GROUP BY + `x_18`.`MiddleName` +UNION ALL +SELECT + `x_19`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_19` +WHERE + `x_19`.`MiddleName` IS NOT NULL +GROUP BY + `x_19`.`MiddleName` +UNION ALL +SELECT + `x_20`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_20` +WHERE + `x_20`.`MiddleName` IS NOT NULL +GROUP BY + `x_20`.`MiddleName` + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.5.7.LinqService,False).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.5.7.LinqService,False).sql new file mode 100644 index 000000000000..180dfd0f797c --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.5.7.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.5.7.LinqService,True).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.5.7.LinqService,True).sql new file mode 100644 index 000000000000..180dfd0f797c --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySql.5.7.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.5.7.LinqService,False).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.5.7.LinqService,False).sql new file mode 100644 index 000000000000..180dfd0f797c --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.5.7.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.5.7.LinqService,True).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.5.7.LinqService,True).sql new file mode 100644 index 000000000000..180dfd0f797c --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySql.5.7.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySql.5.7.LinqService).sql index f1913b8211bc..b6efc41ac9aa 100644 --- a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySql.5.7.LinqService).sql @@ -1,74 +1,13 @@ BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `TakeSkipClass` - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -CREATE TABLE IF NOT EXISTS `TakeSkipClass` -( - `Value` VARCHAR(10) NULL -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -DROP TABLE IF EXISTS `TakeSkipClass` +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @skip Int32 +SET @skip = 3 + +SELECT + `t1`.`Value` +FROM + `TakeSkipClass` `t1` +ORDER BY + `t1`.`Value` +LIMIT @skip, 9223372036854775807 diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.5.7.LinqService,False).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.5.7.LinqService,False).sql index 6cf268ab3b87..59e5c69496c0 100644 --- a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.5.7.LinqService,False).sql +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.5.7.LinqService,False).sql @@ -18,3 +18,23 @@ FROM `Child` `ch` LIMIT 3 +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT 2 + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT 3 + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.5.7.LinqService,True).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.5.7.LinqService,True).sql index cbaed0ecc037..d5449619db4c 100644 --- a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.5.7.LinqService,True).sql +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySql.5.7.LinqService,True).sql @@ -22,3 +22,27 @@ FROM `Child` `ch` LIMIT @take +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @take Int32 +SET @take = 2 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT @take + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT @take + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.5.7.LinqService,False).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.5.7.LinqService,False).sql new file mode 100644 index 000000000000..f5ab3cb2126b --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.5.7.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @n + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.5.7.LinqService,True).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.5.7.LinqService,True).sql new file mode 100644 index 000000000000..f5ab3cb2126b --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySql.5.7.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @n + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.5.7.LinqService,False).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.5.7.LinqService,False).sql new file mode 100644 index 000000000000..2501646b5431 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.5.7.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` > 3 OR `ch`.`ChildID` < 4 +LIMIT 3 + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.5.7.LinqService,True).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.5.7.LinqService,True).sql new file mode 100644 index 000000000000..b47831b4eeca --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySql.5.7.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` > 3 OR `ch`.`ChildID` < 4 +LIMIT @take + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.5.7.LinqService,False).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.5.7.LinqService,False).sql new file mode 100644 index 000000000000..844bde2b099d --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.5.7.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` >= 0 AND `ch`.`ChildID` <= 100 +LIMIT 3 + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.5.7.LinqService,True).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.5.7.LinqService,True).sql new file mode 100644 index 000000000000..fd85da816327 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySql.5.7.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` >= 0 AND `ch`.`ChildID` <= 100 +LIMIT @take + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.5.7.LinqService,False).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.5.7.LinqService,False).sql new file mode 100644 index 000000000000..f9eb7302b58d --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.5.7.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT 3 + diff --git a/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.5.7.LinqService,True).sql b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.5.7.LinqService,True).sql new file mode 100644 index 000000000000..ce5b6939e8d6 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySql.5.7.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @take + diff --git a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,False,False).sql b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,False,False).sql index 2d2658de5206..a6b41871c2eb 100644 --- a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,False,False).sql +++ b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,False,True).sql b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,False,True).sql index 2d2658de5206..a6b41871c2eb 100644 --- a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,False,True).sql +++ b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,True,False).sql b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,True,False).sql index 6fa22767932d..5e8329159c0f 100644 --- a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,True,False).sql +++ b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE `testdata`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,True,True).sql b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,True,True).sql index 6fa22767932d..5e8329159c0f 100644 --- a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,True,True).sql +++ b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,False,True,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE `testdata`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,False,False).sql b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,False,False).sql index 2d2658de5206..a6b41871c2eb 100644 --- a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,False,False).sql +++ b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,False,True).sql b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,False,True).sql index 2d2658de5206..a6b41871c2eb 100644 --- a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,False,True).sql +++ b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,True,False).sql b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,True,False).sql index 6fa22767932d..5e8329159c0f 100644 --- a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,True,False).sql +++ b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE `testdata`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,True,True).sql b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,True,True).sql index 6fa22767932d..5e8329159c0f 100644 --- a/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,True,True).sql +++ b/MySql.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySql.5.7.LinqService,True,True,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE `testdata`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..17232feb2905 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySql.5.7.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `TestTable` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE `TestTable` +( + `ID` INT AUTO_INCREMENT NOT NULL, + `Field1` VARCHAR(50) NULL, + `Field2` VARCHAR(4000) NULL, + `CreatedOn` DATETIME NULL, + + CONSTRAINT `PK_TestTable` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ID`, + `t1`.`Field1`, + `t1`.`Field2`, + `t1`.`CreatedOn` +FROM + `TestTable` `t1` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE `TestTable` + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySql.5.7.LinqService).sql index ec6d04cc8218..01207a99724e 100644 --- a/MySql.5.7.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySql.5.7.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `TempTable` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE IF NOT EXISTS `TempTable` +( + `ID` INT NOT NULL +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +INSERT INTO `TempTable` +( + `ID` +) +SELECT + `p`.`ParentID` +FROM + `Parent` `p` + +BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 SELECT @@ -7,3 +32,8 @@ FROM `Parent` `p` INNER JOIN `TempTable` `t` ON `p`.`ParentID` = `t`.`ID` +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `TempTable` + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..9078de7d95e8 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySql.5.7.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +DELETE +FROM + `xxPerson` +WHERE + `xxPerson`.`PersonID` = @ID + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE `xxPerson` + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..905fcc289f46 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySql.5.7.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..354a08ea8ccb --- /dev/null +++ b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySql.5.7.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +SELECT + `c_1`.`ParentID`, + @id +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = 11 + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..354a08ea8ccb --- /dev/null +++ b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySql.5.7.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +SELECT + `c_1`.`ParentID`, + @id +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = 11 + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySql.5.7.LinqService).sql index ac38345f2add..864a09576334 100644 --- a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySql.5.7.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) DECLARE @FirstName VarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName VarChar(4) -- String @@ -60,3 +100,32 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `p` +WHERE + `p`.`FirstName` = 'Steven' AND `p`.`LastName` = 'King' AND + `p`.`Gender` = 'M' + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE `xxPerson` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySql.5.7.LinqService).sql index 558888e8cbe1..1e186cfc12dc 100644 --- a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySql.5.7.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..afd8d90288b3 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySql.5.7.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `xxPatient` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE `xxPatient` +( + `PersonID` INT NOT NULL, + `Diagnosis` VARCHAR(4000) NULL, + + CONSTRAINT `PK_xxPatient` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPatient` `t1` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPatient` `t1` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `xxPatient` + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySql.5.7.LinqService).sql index 558888e8cbe1..71681585e37a 100644 --- a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySql.5.7.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySql.5.7.LinqService).sql index 558888e8cbe1..71681585e37a 100644 --- a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySql.5.7.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySql.5.7.LinqService).sql index 3d63af440431..c3e215be7384 100644 --- a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySql.5.7.LinqService).sql @@ -28,6 +28,21 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = 'John' AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 diff --git a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySql.5.7.LinqService).sql index 3d63af440431..c3e215be7384 100644 --- a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySql.5.7.LinqService).sql @@ -28,6 +28,21 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = 'John' AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 diff --git a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySql.5.7.LinqService).sql index 3081658ed5f9..8e1da61bd430 100644 --- a/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySql.5.7.LinqService).sql @@ -38,6 +38,23 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John0' + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = @p AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) DECLARE @FirstName VarChar(5) -- String @@ -69,6 +86,23 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John1' + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = @p AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 diff --git a/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..cc0f3bc36fcb --- /dev/null +++ b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySql.5.7.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +UPDATE + `Parent` `p1` + INNER JOIN `Parent` `p2` ON `p1`.`ParentID` = `p2`.`ParentID` +SET + `p1`.`ParentID` = `p2`.`ParentID` +WHERE + `p1`.`ParentID` < 3 + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..6e7cc50c1699 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySql.5.7.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + `Parent` `p` +SET + `p`.`ParentID` = `p`.`ParentID` + 1 +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @p + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..6e7cc50c1699 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySql.5.7.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + `Parent` `p` +SET + `p`.`ParentID` = `p`.`ParentID` + 1 +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @p + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..3386dc88da41 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySql.5.7.LinqService).sql @@ -0,0 +1,53 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +UPDATE + `Child` `c_1` + LEFT JOIN `Parent` `a_Parent` ON `c_1`.`ParentID` = `a_Parent`.`ParentID` +SET + `c_1`.`ChildID` = `c_1`.`ChildID` + 1 +WHERE + `c_1`.`ChildID` = @id AND `a_Parent`.`Value1` = 1 + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @p + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..1cd3f625e4eb --- /dev/null +++ b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySql.5.7.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +INSERT INTO `Child` +( + `ChildID`, + `ParentID` +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +UPDATE + `Parent` `a_Parent`, + `Child` `child_1` +SET + `a_Parent`.`Value1` = 5 +WHERE + `child_1`.`ChildID` = 10000 AND `child_1`.`ParentID` = `a_Parent`.`ParentID` + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..1cd3f625e4eb --- /dev/null +++ b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySql.5.7.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +INSERT INTO `Child` +( + `ChildID`, + `ParentID` +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +UPDATE + `Parent` `a_Parent`, + `Child` `child_1` +SET + `a_Parent`.`Value1` = 5 +WHERE + `child_1`.`ChildID` = 10000 AND `child_1`.`ParentID` = `a_Parent`.`ParentID` + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySql.5.7.LinqService).sql new file mode 100644 index 000000000000..ff6f37a09de1 --- /dev/null +++ b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySql.5.7.LinqService).sql @@ -0,0 +1,107 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Int32 +SET @ID = 1 + +UPDATE + `xxPerson` `t1` +SET + `t1`.`FirstName` = @FirstName, + `t1`.`LastName` = @LastName, + `t1`.`MiddleName` = @MiddleName, + `t1`.`Gender` = @Gender +WHERE + `t1`.`PersonID` = @ID + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +DROP TABLE `xxPerson` + diff --git a/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySql.5.7.LinqService).sql b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySql.5.7.LinqService).sql index 6fc236ae97e7..480e2410a4a2 100644 --- a/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySql.5.7.LinqService).sql +++ b/MySql.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySql.5.7.LinqService).sql @@ -34,3 +34,60 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `t1`.`PersonID`, + `t1`.`Gender`, + `t1`.`FirstName`, + `t1`.`MiddleName`, + `t1`.`LastName` +FROM + `Person` `t1` +WHERE + `t1`.`PersonID` = @id +LIMIT 1 + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @Gender String(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName VarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName VarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName VarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int32 +SET @ID = 5 + +UPDATE + `Person` `t1` +SET + `t1`.`Gender` = @Gender, + `t1`.`FirstName` = @Name_FirstName, + `t1`.`MiddleName` = @Name_MiddleName, + `t1`.`LastName` = @Name_LastName +WHERE + `t1`.`PersonID` = @ID + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `t1`.`PersonID`, + `t1`.`Gender`, + `t1`.`FirstName`, + `t1`.`MiddleName`, + `t1`.`LastName` +FROM + `Person` `t1` +WHERE + `t1`.`PersonID` = @id +LIMIT 1 + diff --git a/MySql.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySql.5.7).sql b/MySql.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySql.5.7).sql new file mode 100644 index 000000000000..785aa370b7f6 --- /dev/null +++ b/MySql.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySql.5.7).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySql.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySql.5.7).sql b/MySql.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySql.5.7).sql new file mode 100644 index 000000000000..20deebe32d41 --- /dev/null +++ b/MySql.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySql.5.7).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySql.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySql.5.7).sql b/MySql.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySql.5.7).sql new file mode 100644 index 000000000000..20deebe32d41 --- /dev/null +++ b/MySql.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySql.5.7).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..c7ef309a77a4 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` <= 3 + ) as `c1` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..fb70872112f5 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT DISTINCT + `a_Parent1`.`ParentID` + FROM + `Child` `t1` + INNER JOIN `Parent` `a_Parent1` ON `t1`.`ParentID` = `a_Parent1`.`ParentID` + ) `m_1` + INNER JOIN (`Child` `d` + INNER JOIN `Parent` `a_Parent1_1` ON `d`.`ParentID` = `a_Parent1_1`.`ParentID`) + ON `m_1`.`ParentID` = `a_Parent1_1`.`ParentID` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `a_Parent1`.`ParentID` +FROM + `Child` `t1` + INNER JOIN `Parent` `a_Parent1` ON `t1`.`ParentID` = `a_Parent1`.`ParentID` +GROUP BY + `a_Parent1`.`ParentID` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..53ec9c76faf3 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..179e1fb7f30c --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` > 1 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..53ec9c76faf3 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..179e1fb7f30c --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` > 1 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..90ec50290470 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + `t1`.`PersonID` + FROM + `Person` `t1` + ) + THEN 1 + ELSE 0 + END as `c1` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..e35102e6449c --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`PersonID` = 1 +LIMIT 1 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySqlConnector.5.7.LinqService).sql index 73ac50920008..e67d201464fd 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(MySqlConnector.5.7.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY `t1`.`ParentID` LIMIT @skip, @take +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @skip Int32 +SET @skip = 1 +DECLARE @take Int32 +SET @take = 2 + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` +ORDER BY + `t1`.`ParentID` +LIMIT @skip, @take + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..726f673e649e --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 +DECLARE @p_1 Int32 +SET @p_1 = 2 +DECLARE @p_2 Int32 +SET @p_2 = 3 +DECLARE @param Int32 +SET @param = 4 + +SELECT + `o`.`ParentID`, + `o`.`Value1` +FROM + `Parent` `o` +WHERE + `o`.`ParentID` IN (@p, @p_1, @p_2) OR `o`.`ParentID` = @param +LIMIT 1 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..39ae27ad17af --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +ORDER BY + `t1`.`ParentID`, + `t1`.`ChildID` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..39ae27ad17af --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +ORDER BY + `t1`.`ParentID`, + `t1`.`ChildID` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..8cc2d8e7f570 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..8cc2d8e7f570 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + `Child` `c_1` + WHERE + `c_1`.`ParentID` = @p + ) as `c1` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..cb6a5a13ec64 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = @p +ORDER BY + `x`.`ParentID` DESC +LIMIT 1 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..15c36212d51b --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT @p + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT @p + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..bb1ac3982478 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + `c_1`.`ParentID` + FROM + `Child` `c_1` + ) + THEN 1 + ELSE 0 + END as `c1` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + `c_1`.`ParentID` + FROM + `Child` `c_1` + ) + THEN 1 + ELSE 0 + END as `c1` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..00eca3093c2f --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..00eca3093c2f --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..2da168f120ea --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..2da168f120ea --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + `c_1`.`ParentID`, + `c_1`.`ChildID` +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p +LIMIT 1 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..899cb485ef30 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..899cb485ef30 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(`c_1`.`ParentID`) +FROM + `Child` `c_1` +WHERE + `c_1`.`ParentID` = @p + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySqlConnector.5.7.LinqService).sql index c338d8c606ef..1ebf698b20da 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(MySqlConnector.5.7.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + `AsyncDataTable` `c_1` + WHERE + `c_1`.`Id` = @p + ) as `c1` diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySqlConnector.5.7.LinqService).sql index c338d8c606ef..8431b8a775b7 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(MySqlConnector.5.7.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySqlConnector.5.7.LinqService).sql index c338d8c606ef..a77793310fa9 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(MySqlConnector.5.7.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 1 diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySqlConnector.5.7.LinqService).sql index c338d8c606ef..a77793310fa9 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(MySqlConnector.5.7.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 1 diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySqlConnector.5.7.LinqService).sql index c338d8c606ef..8431b8a775b7 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(MySqlConnector.5.7.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySqlConnector.5.7.LinqService).sql index c338d8c606ef..03e951eb3da3 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(MySqlConnector.5.7.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MAX(`c_1`.`Id`) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` > @p diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySqlConnector.5.7.LinqService).sql index c338d8c606ef..3a7503f9d336 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(MySqlConnector.5.7.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MIN(`c_1`.`Id`) +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` > @p diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySqlConnector.5.7.LinqService).sql index c338d8c606ef..0cca0a946871 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(MySqlConnector.5.7.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 2 diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySqlConnector.5.7.LinqService).sql index c338d8c606ef..0cca0a946871 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(MySqlConnector.5.7.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -CREATE TABLE IF NOT EXISTS `AsyncDataTable` -( - `Id` INT NOT NULL, - - CONSTRAINT `PK_AsyncDataTable` PRIMARY KEY CLUSTERED (`Id`) -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO `AsyncDataTable` -( - `Id` -) -VALUES -( - @Id -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `AsyncDataTable` +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + @p, + `c_1`.`Id` +FROM + `AsyncDataTable` `c_1` +WHERE + `c_1`.`Id` = @p +LIMIT 2 diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..63cbe9fab8a1 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = 1 +UNION ALL +SELECT + `p_1`.`ParentID`, + `p_1`.`Value1` +FROM + `Parent` `p_1` +WHERE + `p_1`.`ParentID` = 2 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySqlConnector.5.7.LinqService).sql index ea7b8caccff2..4222c7d6f377 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(MySqlConnector.5.7.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO `ConcurrencyAutoIncrement` +( + `Id`, + `Stamp`, + `Value` +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 SELECT @@ -8,6 +30,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 @@ -18,6 +57,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 @@ -28,6 +84,23 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + `ConcurrencyAutoIncrement` `obj` +SET + `obj`.`Stamp` = `obj`.`Stamp` + 1, + `obj`.`Value` = @Value +WHERE + `obj`.`Id` = @Id AND `obj`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 @@ -38,6 +111,19 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyAutoIncrement` +WHERE + `ConcurrencyAutoIncrement`.`Id` = @Id AND `ConcurrencyAutoIncrement`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 @@ -48,6 +134,19 @@ SELECT FROM `ConcurrencyAutoIncrement` `t1` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -8 + +DELETE +FROM + `ConcurrencyAutoIncrement` +WHERE + `ConcurrencyAutoIncrement`.`Id` = @Id AND `ConcurrencyAutoIncrement`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySqlConnector.5.7.LinqService).sql index 4a2cfbc617e1..25b4dbdc982c 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(MySqlConnector.5.7.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO `ConcurrencyFiltered` +( + `Id`, + `Stamp`, + `Value` +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 SELECT @@ -8,6 +30,23 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyFiltered` `r` +SET + `r`.`Stamp` = `r`.`Stamp` + 1, + `r`.`Value` = @Value +WHERE + `r`.`Id` = 2 AND `r`.`Id` = @Id AND `r`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 @@ -18,6 +57,23 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + `ConcurrencyFiltered` `r` +SET + `r`.`Stamp` = `r`.`Stamp` + 1, + `r`.`Value` = @Value +WHERE + `r`.`Id` = 1 AND `r`.`Id` = @Id AND `r`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 @@ -28,6 +84,20 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyFiltered` +WHERE + `ConcurrencyFiltered`.`Id` = 2 AND `ConcurrencyFiltered`.`Id` = @Id AND + `ConcurrencyFiltered`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 @@ -38,6 +108,20 @@ SELECT FROM `ConcurrencyFiltered` `t1` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE +FROM + `ConcurrencyFiltered` +WHERE + `ConcurrencyFiltered`.`Id` = 1 AND `ConcurrencyFiltered`.`Id` = @Id AND + `ConcurrencyFiltered`.`Stamp` = @Stamp + BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..5cddabe85599 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `Parent` `t1` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..2cc4046b6112 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 2 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..a81722b2d84e --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + `Child` `c_1` + LEFT JOIN `Parent` `a_Parent` ON `c_1`.`ParentID` = `a_Parent`.`ParentID` + WHERE + `a_Parent`.`ParentID` = `t1`.`ParentID` + )) +FROM + `Parent` `t1` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySqlConnector.5.7.LinqService).sql index 5735f608a774..ee82bec4af53 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(MySqlConnector.5.7.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `DynamicParent` - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -CREATE TABLE IF NOT EXISTS `DynamicParent` -( - `ID` INT AUTO_INCREMENT NOT NULL, - - CONSTRAINT `PK_DynamicParent` PRIMARY KEY CLUSTERED (`ID`) -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `DynamicChild` - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -CREATE TABLE IF NOT EXISTS `DynamicChild` -( - `ID` INT AUTO_INCREMENT NOT NULL, - `ParentID` INT NOT NULL, - - CONSTRAINT `PK_DynamicChild` PRIMARY KEY CLUSTERED (`ID`) -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `DynamicChild` - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `DynamicParent` +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `it`.`ID` +FROM + `DynamicParent` `it` + LEFT JOIN `DynamicChild` `a_Child` ON `it`.`ID` = `a_Child`.`ParentID` +WHERE + `a_Child`.`ID` = 123 diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySqlConnector.5.7.LinqService).sql index 803056e6a8dc..26e3be0798c4 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(MySqlConnector.5.7.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT + `x`.`ParentID` + FROM + `Parent` `x` + WHERE + `x`.`ParentID` = 3 + LIMIT 1 + ) `m_1` + INNER JOIN `Child` `d` ON `m_1`.`ParentID` = `d`.`ParentID` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySqlConnector.5.7.LinqService).sql index 8f1f5b3838f4..6d8910d52f98 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(MySqlConnector.5.7.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `m_1`.`ParentID`, + `d`.`ParentID`, + `d`.`ChildID` +FROM + ( + SELECT + `x`.`ParentID` + FROM + `Parent` `x` + WHERE + `x`.`ParentID` = 3 + LIMIT 1 + ) `m_1` + INNER JOIN `Child` `d` ON `m_1`.`ParentID` = `d`.`ParentID` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `x`.`ParentID`, + `x`.`Value1` +FROM + `Parent` `x` +WHERE + `x`.`ParentID` = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..0a1603fd1387 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + `Child` `a_Children` + INNER JOIN `GrandChild` `a_GrandChildren` ON `a_Children`.`ParentID` = `a_GrandChildren`.`ParentID` AND `a_Children`.`ChildID` = `a_GrandChildren`.`ChildID` + WHERE + `p`.`ParentID` = `a_Children`.`ParentID` + ) +FROM + `Parent` `p` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..546bdd347285 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` +WHERE + `t1`.`Value1` = 1 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..3e4e910c00b8 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT DISTINCT + `p1`.`PersonID`, + `p1`.`Gender`, + `p1`.`FirstName`, + `p1`.`LastName` +FROM + `Person` `p1` +WHERE + `p1`.`PersonID` IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + `p1`.`Gender` = 'F' + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..e002e64244fc --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + 1 as `c1` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..116bd300949d --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `x`.`MiddleName`, + COUNT(*) +FROM + `Person` `x` +WHERE + `x`.`MiddleName` IS NOT NULL +GROUP BY + `x`.`MiddleName` +UNION ALL +SELECT + `x_1`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_1` +WHERE + `x_1`.`MiddleName` IS NOT NULL +GROUP BY + `x_1`.`MiddleName` +UNION ALL +SELECT + `x_2`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_2` +WHERE + `x_2`.`MiddleName` IS NOT NULL +GROUP BY + `x_2`.`MiddleName` +UNION ALL +SELECT + `x_3`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_3` +WHERE + `x_3`.`MiddleName` IS NOT NULL +GROUP BY + `x_3`.`MiddleName` +UNION ALL +SELECT + `x_4`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_4` +WHERE + `x_4`.`MiddleName` IS NOT NULL +GROUP BY + `x_4`.`MiddleName` +UNION ALL +SELECT + `x_5`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_5` +WHERE + `x_5`.`MiddleName` IS NOT NULL +GROUP BY + `x_5`.`MiddleName` +UNION ALL +SELECT + `x_6`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_6` +WHERE + `x_6`.`MiddleName` IS NOT NULL +GROUP BY + `x_6`.`MiddleName` +UNION ALL +SELECT + `x_7`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_7` +WHERE + `x_7`.`MiddleName` IS NOT NULL +GROUP BY + `x_7`.`MiddleName` +UNION ALL +SELECT + `x_8`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_8` +WHERE + `x_8`.`MiddleName` IS NOT NULL +GROUP BY + `x_8`.`MiddleName` +UNION ALL +SELECT + `x_9`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_9` +WHERE + `x_9`.`MiddleName` IS NOT NULL +GROUP BY + `x_9`.`MiddleName` +UNION ALL +SELECT + `x_10`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_10` +WHERE + `x_10`.`MiddleName` IS NOT NULL +GROUP BY + `x_10`.`MiddleName` +UNION ALL +SELECT + `x_11`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_11` +WHERE + `x_11`.`MiddleName` IS NOT NULL +GROUP BY + `x_11`.`MiddleName` +UNION ALL +SELECT + `x_12`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_12` +WHERE + `x_12`.`MiddleName` IS NOT NULL +GROUP BY + `x_12`.`MiddleName` +UNION ALL +SELECT + `x_13`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_13` +WHERE + `x_13`.`MiddleName` IS NOT NULL +GROUP BY + `x_13`.`MiddleName` +UNION ALL +SELECT + `x_14`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_14` +WHERE + `x_14`.`MiddleName` IS NOT NULL +GROUP BY + `x_14`.`MiddleName` +UNION ALL +SELECT + `x_15`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_15` +WHERE + `x_15`.`MiddleName` IS NOT NULL +GROUP BY + `x_15`.`MiddleName` +UNION ALL +SELECT + `x_16`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_16` +WHERE + `x_16`.`MiddleName` IS NOT NULL +GROUP BY + `x_16`.`MiddleName` +UNION ALL +SELECT + `x_17`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_17` +WHERE + `x_17`.`MiddleName` IS NOT NULL +GROUP BY + `x_17`.`MiddleName` +UNION ALL +SELECT + `x_18`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_18` +WHERE + `x_18`.`MiddleName` IS NOT NULL +GROUP BY + `x_18`.`MiddleName` +UNION ALL +SELECT + `x_19`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_19` +WHERE + `x_19`.`MiddleName` IS NOT NULL +GROUP BY + `x_19`.`MiddleName` +UNION ALL +SELECT + `x_20`.`MiddleName`, + COUNT(*) +FROM + `Person` `x_20` +WHERE + `x_20`.`MiddleName` IS NOT NULL +GROUP BY + `x_20`.`MiddleName` + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.5.7.LinqService,False).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.5.7.LinqService,False).sql new file mode 100644 index 000000000000..fb78866b88ca --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.5.7.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.5.7.LinqService,True).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.5.7.LinqService,True).sql new file mode 100644 index 000000000000..fb78866b88ca --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(MySqlConnector.5.7.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.5.7.LinqService,False).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.5.7.LinqService,False).sql new file mode 100644 index 000000000000..fb78866b88ca --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.5.7.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.5.7.LinqService,True).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.5.7.LinqService,True).sql new file mode 100644 index 000000000000..fb78866b88ca --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(MySqlConnector.5.7.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + `p`.`ParentID`, + `p`.`Value1` +FROM + `Parent` `p` +WHERE + `p`.`ParentID` > 1 +ORDER BY + `p`.`ParentID` +LIMIT @n, 1 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySqlConnector.5.7.LinqService).sql index 0d2aa27e04e8..d792394d5221 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(MySqlConnector.5.7.LinqService).sql @@ -1,74 +1,13 @@ BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `TakeSkipClass` - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -CREATE TABLE IF NOT EXISTS `TakeSkipClass` -( - `Value` VARCHAR(10) NULL -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO `TakeSkipClass` -( - `Value` -) -VALUES -( - @Value -) - -BeforeExecute --- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 - -DROP TABLE IF EXISTS `TakeSkipClass` +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @skip Int32 +SET @skip = 3 + +SELECT + `t1`.`Value` +FROM + `TakeSkipClass` `t1` +ORDER BY + `t1`.`Value` +LIMIT @skip, 9223372036854775807 diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.5.7.LinqService,False).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.5.7.LinqService,False).sql index e4905efaba14..dd330b566587 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.5.7.LinqService,False).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.5.7.LinqService,False).sql @@ -18,3 +18,23 @@ FROM `Child` `ch` LIMIT 3 +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT 2 + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT 3 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.5.7.LinqService,True).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.5.7.LinqService,True).sql index 0286cb890de4..39fca07fcc2e 100644 --- a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.5.7.LinqService,True).sql +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(MySqlConnector.5.7.LinqService,True).sql @@ -22,3 +22,27 @@ FROM `Child` `ch` LIMIT @take +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @take Int32 +SET @take = 2 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT @take + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +LIMIT @take + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.5.7.LinqService,False).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.5.7.LinqService,False).sql new file mode 100644 index 000000000000..f266896b0931 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.5.7.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @n + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.5.7.LinqService,True).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.5.7.LinqService,True).sql new file mode 100644 index 000000000000..f266896b0931 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(MySqlConnector.5.7.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @n + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.5.7.LinqService,False).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.5.7.LinqService,False).sql new file mode 100644 index 000000000000..086cc149d981 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.5.7.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` > 3 OR `ch`.`ChildID` < 4 +LIMIT 3 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.5.7.LinqService,True).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.5.7.LinqService,True).sql new file mode 100644 index 000000000000..aff3fe3e6415 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(MySqlConnector.5.7.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` > 3 OR `ch`.`ChildID` < 4 +LIMIT @take + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.5.7.LinqService,False).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.5.7.LinqService,False).sql new file mode 100644 index 000000000000..2ec61e17154f --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.5.7.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` >= 0 AND `ch`.`ChildID` <= 100 +LIMIT 3 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.5.7.LinqService,True).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.5.7.LinqService,True).sql new file mode 100644 index 000000000000..809cd038e712 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(MySqlConnector.5.7.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `ch`.`ParentID`, + `ch`.`ChildID` +FROM + `Child` `ch` +WHERE + `ch`.`ChildID` >= 0 AND `ch`.`ChildID` <= 100 +LIMIT @take + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.5.7.LinqService,False).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.5.7.LinqService,False).sql new file mode 100644 index 000000000000..b450470b2626 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.5.7.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT 3 + diff --git a/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.5.7.LinqService,True).sql b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.5.7.LinqService,True).sql new file mode 100644 index 000000000000..8286dc1e1260 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(MySqlConnector.5.7.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + `t1`.`ParentID`, + `t1`.`ChildID` +FROM + `Child` `t1` +LIMIT @take + diff --git a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,False,False).sql b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,False,False).sql index e6617a2b0fba..2ab14ac64310 100644 --- a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,False,False).sql +++ b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,False,True).sql b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,False,True).sql index e6617a2b0fba..2ab14ac64310 100644 --- a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,False,True).sql +++ b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,True,False).sql b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,True,False).sql index 9d2ef4e2db95..74ac6e6953b1 100644 --- a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,True,False).sql +++ b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE `testdataconnector`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,True,True).sql b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,True,True).sql index 9d2ef4e2db95..74ac6e6953b1 100644 --- a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,True,True).sql +++ b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,False,True,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE `testdataconnector`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,False,False).sql b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,False,False).sql index e6617a2b0fba..2ab14ac64310 100644 --- a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,False,False).sql +++ b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,False,True).sql b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,False,True).sql index e6617a2b0fba..2ab14ac64310 100644 --- a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,False,True).sql +++ b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE `Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,True,False).sql b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,True,False).sql index 9d2ef4e2db95..74ac6e6953b1 100644 --- a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,True,False).sql +++ b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE `testdataconnector`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,True,True).sql b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,True,True).sql index 9d2ef4e2db95..74ac6e6953b1 100644 --- a/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,True,True).sql +++ b/MySqlConnector.5.7.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(MySqlConnector.5.7.LinqService,True,True,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS `Issue681Table2` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE `testdataconnector`.`Issue681Table2` +( + `ID` INT NOT NULL, + `Value` INT NOT NULL, + + CONSTRAINT `PK_Issue681Table2` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `Issue681Table2` + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..457958881b70 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `TestTable` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE `TestTable` +( + `ID` INT AUTO_INCREMENT NOT NULL, + `Field1` VARCHAR(50) NULL, + `Field2` VARCHAR(4000) NULL, + `CreatedOn` DATETIME NULL, + + CONSTRAINT `PK_TestTable` PRIMARY KEY CLUSTERED (`ID`) +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ID`, + `t1`.`Field1`, + `t1`.`Field2`, + `t1`.`CreatedOn` +FROM + `TestTable` `t1` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE `TestTable` + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySqlConnector.5.7.LinqService).sql index 483b12e1ceb6..00a0ecefbb19 100644 --- a/MySqlConnector.5.7.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(MySqlConnector.5.7.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `TempTable` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE IF NOT EXISTS `TempTable` +( + `ID` INT NOT NULL +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +INSERT INTO `TempTable` +( + `ID` +) +SELECT + `p`.`ParentID` +FROM + `Parent` `p` + +BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 SELECT @@ -7,3 +32,8 @@ FROM `Parent` `p` INNER JOIN `TempTable` `t` ON `p`.`ParentID` = `t`.`ID` +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `TempTable` + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..30a52173de88 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +DELETE +FROM + `xxPerson` +WHERE + `xxPerson`.`PersonID` = @ID + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE `xxPerson` + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..8d7f0fba788b --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..5ddea55a07d6 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +SELECT + `c_1`.`ParentID`, + @id +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = 11 + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..5ddea55a07d6 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +SELECT + `c_1`.`ParentID`, + @id +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = 11 + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DELETE +FROM + `Child` +WHERE + `Child`.`ChildID` > 1000 + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySqlConnector.5.7.LinqService).sql index e3340c77e746..7671fc3c925f 100644 --- a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(MySqlConnector.5.7.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) DECLARE @FirstName VarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName VarChar(4) -- String @@ -60,3 +100,32 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `p` +WHERE + `p`.`FirstName` = 'Steven' AND `p`.`LastName` = 'King' AND + `p`.`Gender` = 'M' + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE `xxPerson` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySqlConnector.5.7.LinqService).sql index 48a29b977f72..16ed40b3fbc3 100644 --- a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(MySqlConnector.5.7.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..c34308c358f1 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `xxPatient` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE `xxPatient` +( + `PersonID` INT NOT NULL, + `Diagnosis` VARCHAR(4000) NULL, + + CONSTRAINT `PK_xxPatient` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPatient` `t1` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO `xxPatient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @PersonID, + @Diagnosis +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = @Diagnosis + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPatient` `t1` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `xxPatient` + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySqlConnector.5.7.LinqService).sql index 48a29b977f72..2e095876095b 100644 --- a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(MySqlConnector.5.7.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySqlConnector.5.7.LinqService).sql index 48a29b977f72..2e095876095b 100644 --- a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(MySqlConnector.5.7.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +INSERT INTO `Patient` +( + `PersonID`, + `Diagnosis` +) +VALUES +( + @id, + 'abc' +) +ON DUPLICATE KEY UPDATE + `Diagnosis` = CAST(Char_Length(`Diagnosis`) + @i AS CHAR(11)) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `p`.`PersonID`, + `p`.`Diagnosis` +FROM + `Patient` `p` +WHERE + `p`.`PersonID` = @id +LIMIT 2 + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySqlConnector.5.7.LinqService).sql index cf00f9c79726..b7928ad5e04e 100644 --- a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(MySqlConnector.5.7.LinqService).sql @@ -28,6 +28,21 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = 'John' AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySqlConnector.5.7.LinqService).sql index cf00f9c79726..b7928ad5e04e 100644 --- a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(MySqlConnector.5.7.LinqService).sql @@ -28,6 +28,21 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = 'John' AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySqlConnector.5.7.LinqService).sql index 0589c07008dc..b1963d38cf99 100644 --- a/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(MySqlConnector.5.7.LinqService).sql @@ -38,6 +38,23 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John0' + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = @p AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) DECLARE @FirstName VarChar(5) -- String @@ -69,6 +86,23 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John1' + +SELECT + `p`.`FirstName`, + `p`.`PersonID`, + `p`.`LastName`, + `p`.`MiddleName`, + `p`.`Gender` +FROM + `Person` `p` +WHERE + `p`.`FirstName` = @p AND `p`.`LastName` = 'Shepard' +LIMIT 2 + BeforeExecute -- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..0f8e41a885b8 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +UPDATE + `Parent` `p1` + INNER JOIN `Parent` `p2` ON `p1`.`ParentID` = `p2`.`ParentID` +SET + `p1`.`ParentID` = `p2`.`ParentID` +WHERE + `p1`.`ParentID` < 3 + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..94f207cfe443 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + `Parent` `p` +SET + `p`.`ParentID` = `p`.`ParentID` + 1 +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @p + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..94f207cfe443 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + `Parent` `p` +SET + `p`.`ParentID` = `p`.`ParentID` + 1 +WHERE + `p`.`ParentID` = @ParentID + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Parent` `p` +WHERE + `p`.`ParentID` = @p + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..88b2b1425b93 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,53 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO `Child` +( + `ParentID`, + `ChildID` +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @id + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +UPDATE + `Child` `c_1` + LEFT JOIN `Parent` `a_Parent` ON `c_1`.`ParentID` = `a_Parent`.`ParentID` +SET + `c_1`.`ChildID` = `c_1`.`ChildID` + 1 +WHERE + `c_1`.`ChildID` = @id AND `a_Parent`.`Value1` = 1 + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + `Child` `c_1` +WHERE + `c_1`.`ChildID` = @p + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..d6dcdbfba1a1 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +INSERT INTO `Child` +( + `ChildID`, + `ParentID` +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +UPDATE + `Parent` `a_Parent`, + `Child` `child_1` +SET + `a_Parent`.`Value1` = 5 +WHERE + `child_1`.`ChildID` = 10000 AND `child_1`.`ParentID` = `a_Parent`.`ParentID` + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..d6dcdbfba1a1 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +INSERT INTO `Parent` +( + `ParentID`, + `Value1` +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +INSERT INTO `Child` +( + `ChildID`, + `ParentID` +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +UPDATE + `Parent` `a_Parent`, + `Child` `child_1` +SET + `a_Parent`.`Value1` = 5 +WHERE + `child_1`.`ChildID` = 10000 AND `child_1`.`ParentID` = `a_Parent`.`ParentID` + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySqlConnector.5.7.LinqService).sql new file mode 100644 index 000000000000..75b5aa02f6e5 --- /dev/null +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(MySqlConnector.5.7.LinqService).sql @@ -0,0 +1,107 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE IF EXISTS `xxPerson` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +CREATE TABLE `xxPerson` +( + `FirstName` VARCHAR(4000) NOT NULL, + `PersonID` INT AUTO_INCREMENT NOT NULL, + `LastName` VARCHAR(4000) NOT NULL, + `MiddleName` VARCHAR(4000) NULL, + `Gender` CHAR NOT NULL, + + CONSTRAINT `PK_xxPerson` PRIMARY KEY CLUSTERED (`PersonID`) +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO `xxPerson` +( + `FirstName`, + `LastName`, + `MiddleName`, + `Gender` +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + COUNT(*) +FROM + `xxPerson` `t1` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender String(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Int32 +SET @ID = 1 + +UPDATE + `xxPerson` `t1` +SET + `t1`.`FirstName` = @FirstName, + `t1`.`LastName` = @LastName, + `t1`.`MiddleName` = @MiddleName, + `t1`.`Gender` = @Gender +WHERE + `t1`.`PersonID` = @ID + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`FirstName`, + `t1`.`PersonID`, + `t1`.`LastName`, + `t1`.`MiddleName`, + `t1`.`Gender` +FROM + `xxPerson` `t1` +LIMIT 2 + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +DROP TABLE `xxPerson` + diff --git a/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySqlConnector.5.7.LinqService).sql b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySqlConnector.5.7.LinqService).sql index 7521cd0c36a8..7a796c81cbe2 100644 --- a/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySqlConnector.5.7.LinqService).sql +++ b/MySqlConnector.5.7.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(MySqlConnector.5.7.LinqService).sql @@ -34,3 +34,60 @@ BeforeExecute SELECT LAST_INSERT_ID() +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `t1`.`PersonID`, + `t1`.`Gender`, + `t1`.`FirstName`, + `t1`.`MiddleName`, + `t1`.`LastName` +FROM + `Person` `t1` +WHERE + `t1`.`PersonID` = @id +LIMIT 1 + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @Gender String(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName VarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName VarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName VarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int32 +SET @ID = 5 + +UPDATE + `Person` `t1` +SET + `t1`.`Gender` = @Gender, + `t1`.`FirstName` = @Name_FirstName, + `t1`.`MiddleName` = @Name_MiddleName, + `t1`.`LastName` = @Name_LastName +WHERE + `t1`.`PersonID` = @ID + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + `t1`.`PersonID`, + `t1`.`Gender`, + `t1`.`FirstName`, + `t1`.`MiddleName`, + `t1`.`LastName` +FROM + `Person` `t1` +WHERE + `t1`.`PersonID` = @id +LIMIT 1 + diff --git a/MySqlConnector.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySqlConnector.5.7).sql b/MySqlConnector.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySqlConnector.5.7).sql new file mode 100644 index 000000000000..548a949d9266 --- /dev/null +++ b/MySqlConnector.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(MySqlConnector.5.7).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySqlConnector.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySqlConnector.5.7).sql b/MySqlConnector.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySqlConnector.5.7).sql new file mode 100644 index 000000000000..53ec9c76faf3 --- /dev/null +++ b/MySqlConnector.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(MySqlConnector.5.7).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + diff --git a/MySqlConnector.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySqlConnector.5.7).sql b/MySqlConnector.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySqlConnector.5.7).sql new file mode 100644 index 000000000000..53ec9c76faf3 --- /dev/null +++ b/MySqlConnector.5.7/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(MySqlConnector.5.7).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- MySqlConnector.5.7 MySql.5.7.MySqlConnector MySql57 (asynchronously) + +SELECT + `t1`.`ParentID`, + `t1`.`Value1` +FROM + `Parent` `t1` + From 7cad898c7d0a5b8eb0d22ea2a784fa7b8ada4465 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 20:57:08 +0000 Subject: [PATCH 18/40] [Windows / SQL Server 2022] baselines --- ....All4Async(SqlServer.2022.LinqService).sql | 13 + ...upBy2Async(SqlServer.2022.LinqService).sql | 30 ++ ...rable1Test(SqlServer.2022.LinqService).sql | 9 + ...rable2Test(SqlServer.2022.LinqService).sql | 11 + ...eCast1Test(SqlServer.2022.LinqService).sql | 9 + ...eCast2Test(SqlServer.2022.LinqService).sql | 11 + ...sAsyncTest(SqlServer.2022.LinqService).sql | 13 + ...tAsyncTest(SqlServer.2022.LinqService).sql | 14 + ...keSkipTest(SqlServer.2022.LinqService).sql | 16 + ...tOrDefault(SqlServer.2022.LinqService).sql | 19 + ...pAsyncTest(SqlServer.2022.LinqService).sql | 21 + ...tAsyncTest(SqlServer.2022.LinqService).sql | 21 + ...yTestAsync(SqlServer.2022.LinqService).sql | 30 ++ ...TestAsync2(SqlServer.2022.LinqService).sql | 30 ++ ...AsyncdTest(SqlServer.2022.LinqService).sql | 15 + ...Test3Async(SqlServer.2022.LinqService).sql | 26 + ...sTestAsync(SqlServer.2022.LinqService).sql | 26 + ...tTestAsync(SqlServer.2022.LinqService).sql | 24 + ...TestAsync2(SqlServer.2022.LinqService).sql | 24 + ...TestAsync1(SqlServer.2022.LinqService).sql | 26 + ...TestAsync2(SqlServer.2022.LinqService).sql | 26 + ...xTestAsync(SqlServer.2022.LinqService).sql | 24 + ...TestAsync2(SqlServer.2022.LinqService).sql | 24 + ...icateAsync(SqlServer.2022.LinqService).sql | 172 +------ ...icateAsync(SqlServer.2022.LinqService).sql | 169 +------ ...icateAsync(SqlServer.2022.LinqService).sql | 170 +------ ...icateAsync(SqlServer.2022.LinqService).sql | 170 +------ ...icateAsync(SqlServer.2022.LinqService).sql | 169 +------ ...ectorAsync(SqlServer.2022.LinqService).sql | 169 +------ ...ectorAsync(SqlServer.2022.LinqService).sql | 169 +------ ...icateAsync(SqlServer.2022.LinqService).sql | 170 +------ ...icateAsync(SqlServer.2022.LinqService).sql | 170 +------ ...ncat1Async(SqlServer.2022.LinqService).sql | 19 + ...ementAsync(SqlServer.2022.LinqService).sql | 99 ++++ ...teredAsync(SqlServer.2022.LinqService).sql | 84 ++++ ...ount1Async(SqlServer.2022.LinqService).sql | 8 + ...ount2Async(SqlServer.2022.LinqService).sql | 10 + ...yMax1Async(SqlServer.2022.LinqService).sql | 17 + ....Issue4602(SqlServer.2022.LinqService).sql | 50 +- ...4057_Async(SqlServer.2022.LinqService).sql | 29 ++ ...ransaction(SqlServer.2022.LinqService).sql | 29 ++ ...ssionAsync(SqlServer.2022.LinqService).sql | 25 + ...Cast1Async(SqlServer.2022.LinqService).sql | 11 + ...est18Async(SqlServer.2022.LinqService).sql | 14 + ...eter1Async(SqlServer.2022.LinqService).sql | 6 + ...ue3132Test(SqlServer.2022.LinqService).sql | 213 ++++++++ ...sync(SqlServer.2022.LinqService,False).sql | 16 + ...Async(SqlServer.2022.LinqService,True).sql | 16 + ...sync(SqlServer.2022.LinqService,False).sql | 16 + ...Async(SqlServer.2022.LinqService,True).sql | 16 + ...Skip1Async(SqlServer.2022.LinqService).sql | 84 +--- ...sync(SqlServer.2022.LinqService,False).sql | 18 + ...Async(SqlServer.2022.LinqService,True).sql | 22 + ...sync(SqlServer.2022.LinqService,False).sql | 11 + ...Async(SqlServer.2022.LinqService,True).sql | 11 + ...sync(SqlServer.2022.LinqService,False).sql | 11 + ...Async(SqlServer.2022.LinqService,True).sql | 13 + ...sync(SqlServer.2022.LinqService,False).sql | 11 + ...Async(SqlServer.2022.LinqService,True).sql | 13 + ...sync(SqlServer.2022.LinqService,False).sql | 9 + ...Async(SqlServer.2022.LinqService,True).sql | 11 + ...er.2022.LinqService,False,False,False).sql | 16 + ...ver.2022.LinqService,False,False,True).sql | 16 + ...ver.2022.LinqService,False,True,False).sql | 16 + ...rver.2022.LinqService,False,True,True).sql | 16 + ...able1Async(SqlServer.2022.LinqService).sql | 34 ++ ...TableAsync(SqlServer.2022.LinqService).sql | 31 ++ ...eNameAsync(SqlServer.2022.LinqService).sql | 89 ++++ ...ncTest(SqlServer.2022.LinqService,100).sql | 18 + ...ncTest(SqlServer.2022.LinqService,200).sql | 18 + ...Record(SqlServer.2022.LinqService,100).sql | 13 + ...Record(SqlServer.2022.LinqService,200).sql | 13 + ...ncTest(SqlServer.2022.LinqService,100).sql | 15 + ...ncTest(SqlServer.2022.LinqService,200).sql | 15 + ...Record(SqlServer.2022.LinqService,100).sql | 15 + ...Record(SqlServer.2022.LinqService,200).sql | 15 + ...ncTest(SqlServer.2022.LinqService,100).sql | 21 + ...ncTest(SqlServer.2022.LinqService,200).sql | 21 + ...ncTest(SqlServer.2022.LinqService,100).sql | 12 + ...ncTest(SqlServer.2022.LinqService,200).sql | 12 + ...Record(SqlServer.2022.LinqService,100).sql | 12 + ...Record(SqlServer.2022.LinqService,200).sql | 12 + ...sert2Async(SqlServer.2022.LinqService).sql | 46 ++ ...sert3Async(SqlServer.2022.LinqService).sql | 48 ++ ...sert4Async(SqlServer.2022.LinqService).sql | 48 ++ ...eNameAsync(SqlServer.2022.LinqService).sql | 69 +++ ...lace1Async(SqlServer.2022.LinqService).sql | 97 ++++ ...eNameAsync(SqlServer.2022.LinqService).sql | 149 ++++++ ...date3Async(SqlServer.2022.LinqService).sql | 97 ++++ ...ate3xAsync(SqlServer.2022.LinqService).sql | 103 ++++ ...tity1Async(SqlServer.2022.LinqService).sql | 14 + ...tity2Async(SqlServer.2022.LinqService).sql | 14 + ...tity4Async(SqlServer.2022.LinqService).sql | 32 ++ ...syncTest(SqlServer.2022.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2022.LinqService,2).sql | 41 +- ...syncTest(SqlServer.2022.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2022.LinqService,2).sql | 41 +- ...tAsync(SqlServer.2022.LinqService,100).sql | 24 + ...tAsync(SqlServer.2022.LinqService,200).sql | 24 + ...Record(SqlServer.2022.LinqService,100).sql | 24 + ...Record(SqlServer.2022.LinqService,200).sql | 24 + ...syncTest(SqlServer.2022.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2022.LinqService,2).sql | 41 +- ...syncTest(SqlServer.2022.LinqService,1).sql | 41 +- ...syncTest(SqlServer.2022.LinqService,2).sql | 41 +- ...tFullAsync(SqlServer.2022.LinqService).sql | 54 +++ ...ctionAsync(SqlServer.2022.LinqService).sql | 53 ++ ...mQueryAsyn(SqlServer.2022.LinqService).sql | 40 ++ ...mTableAsyn(SqlServer.2022.LinqService).sql | 38 ++ ...ate12Async(SqlServer.2022.LinqService).sql | 13 + ...date1Async(SqlServer.2022.LinqService).sql | 54 +++ ...date2Async(SqlServer.2022.LinqService).sql | 54 +++ ...date4Async(SqlServer.2022.LinqService).sql | 55 +++ ...tion1Async(SqlServer.2022.LinqService).sql | 41 ++ ...n1AsyncOld(SqlServer.2022.LinqService).sql | 41 ++ ...eNameAsync(SqlServer.2022.LinqService).sql | 105 ++++ ...plex1Async(SqlServer.2022.LinqService).sql | 55 +++ ...oTestAsync(SqlServer.2022.LinqService).sql | 23 + ...tTestAsync(SqlServer.2022.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2022.LinqService).sql | 456 +----------------- ...oTestAsync(SqlServer.2022.LinqService).sql | 23 + ...tTestAsync(SqlServer.2022.LinqService).sql | 451 +---------------- ...nateUpdate(SqlServer.2022.LinqService).sql | 450 +---------------- ...ngleRecord(SqlServer.2022.LinqService).sql | 452 +---------------- ...WithoutOld(SqlServer.2022.LinqService).sql | 450 +---------------- ...nateUpdate(SqlServer.2022.LinqService).sql | 449 +---------------- ...ngleRecord(SqlServer.2022.LinqService).sql | 451 +---------------- ...oTestAsync(SqlServer.2022.LinqService).sql | 23 + ...tTestAsync(SqlServer.2022.LinqService).sql | 454 +---------------- ...ngleRecord(SqlServer.2022.LinqService).sql | 456 +----------------- ...oTestAsync(SqlServer.2022.LinqService).sql | 23 + ...tTestAsync(SqlServer.2022.LinqService).sql | 451 +---------------- ...nateUpdate(SqlServer.2022.LinqService).sql | 450 +---------------- ...ngleRecord(SqlServer.2022.LinqService).sql | 452 +---------------- ...WithoutOld(SqlServer.2022.LinqService).sql | 450 +---------------- ...nateUpdate(SqlServer.2022.LinqService).sql | 449 +---------------- ...ngleRecord(SqlServer.2022.LinqService).sql | 451 +---------------- ...oTestAsync(SqlServer.2022.LinqService).sql | 21 + ...tTestAsync(SqlServer.2022.LinqService).sql | 233 +-------- ...ngleRecord(SqlServer.2022.LinqService).sql | 233 +-------- ...tTestAsync(SqlServer.2022.LinqService).sql | 229 +-------- ...ngleRecord(SqlServer.2022.LinqService).sql | 229 +-------- ...WithoutOld(SqlServer.2022.LinqService).sql | 228 +-------- ...ngleRecord(SqlServer.2022.LinqService).sql | 228 +-------- ...tIntoAsync(SqlServer.2022.LinqService).sql | 21 + ...oTestAsync(SqlServer.2022.LinqService).sql | 22 + ...tTestAsync(SqlServer.2022.LinqService).sql | 234 +-------- ...ngleRecord(SqlServer.2022.LinqService).sql | 234 +-------- ...tTestAsync(SqlServer.2022.LinqService).sql | 230 +-------- ...ngleRecord(SqlServer.2022.LinqService).sql | 230 +-------- ...WithoutOld(SqlServer.2022.LinqService).sql | 229 +-------- ...ngleRecord(SqlServer.2022.LinqService).sql | 229 +-------- ...tIntoAsync(SqlServer.2022.LinqService).sql | 22 + ...l4Async(SqlServer.2022.MS.LinqService).sql | 13 + ...y2Async(SqlServer.2022.MS.LinqService).sql | 30 ++ ...le1Test(SqlServer.2022.MS.LinqService).sql | 9 + ...le2Test(SqlServer.2022.MS.LinqService).sql | 11 + ...st1Test(SqlServer.2022.MS.LinqService).sql | 9 + ...st2Test(SqlServer.2022.MS.LinqService).sql | 11 + ...yncTest(SqlServer.2022.MS.LinqService).sql | 13 + ...yncTest(SqlServer.2022.MS.LinqService).sql | 14 + ...kipTest(SqlServer.2022.MS.LinqService).sql | 16 + ...Default(SqlServer.2022.MS.LinqService).sql | 19 + ...yncTest(SqlServer.2022.MS.LinqService).sql | 21 + ...yncTest(SqlServer.2022.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2022.MS.LinqService).sql | 30 ++ ...tAsync2(SqlServer.2022.MS.LinqService).sql | 30 ++ ...ncdTest(SqlServer.2022.MS.LinqService).sql | 15 + ...t3Async(SqlServer.2022.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2022.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2022.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2022.MS.LinqService).sql | 24 + ...tAsync1(SqlServer.2022.MS.LinqService).sql | 26 + ...tAsync2(SqlServer.2022.MS.LinqService).sql | 26 + ...stAsync(SqlServer.2022.MS.LinqService).sql | 24 + ...tAsync2(SqlServer.2022.MS.LinqService).sql | 24 + ...teAsync(SqlServer.2022.MS.LinqService).sql | 172 +------ ...teAsync(SqlServer.2022.MS.LinqService).sql | 169 +------ ...teAsync(SqlServer.2022.MS.LinqService).sql | 170 +------ ...teAsync(SqlServer.2022.MS.LinqService).sql | 170 +------ ...teAsync(SqlServer.2022.MS.LinqService).sql | 169 +------ ...orAsync(SqlServer.2022.MS.LinqService).sql | 169 +------ ...orAsync(SqlServer.2022.MS.LinqService).sql | 169 +------ ...teAsync(SqlServer.2022.MS.LinqService).sql | 170 +------ ...teAsync(SqlServer.2022.MS.LinqService).sql | 170 +------ ...t1Async(SqlServer.2022.MS.LinqService).sql | 19 + ...ntAsync(SqlServer.2022.MS.LinqService).sql | 99 ++++ ...edAsync(SqlServer.2022.MS.LinqService).sql | 84 ++++ ...t1Async(SqlServer.2022.MS.LinqService).sql | 8 + ...t2Async(SqlServer.2022.MS.LinqService).sql | 10 + ...x1Async(SqlServer.2022.MS.LinqService).sql | 17 + ...sue4602(SqlServer.2022.MS.LinqService).sql | 50 +- ...7_Async(SqlServer.2022.MS.LinqService).sql | 29 ++ ...saction(SqlServer.2022.MS.LinqService).sql | 29 ++ ...onAsync(SqlServer.2022.MS.LinqService).sql | 25 + ...t1Async(SqlServer.2022.MS.LinqService).sql | 11 + ...18Async(SqlServer.2022.MS.LinqService).sql | 14 + ...r1Async(SqlServer.2022.MS.LinqService).sql | 6 + ...132Test(SqlServer.2022.MS.LinqService).sql | 213 ++++++++ ...c(SqlServer.2022.MS.LinqService,False).sql | 16 + ...nc(SqlServer.2022.MS.LinqService,True).sql | 16 + ...c(SqlServer.2022.MS.LinqService,False).sql | 16 + ...nc(SqlServer.2022.MS.LinqService,True).sql | 16 + ...p1Async(SqlServer.2022.MS.LinqService).sql | 84 +--- ...c(SqlServer.2022.MS.LinqService,False).sql | 18 + ...nc(SqlServer.2022.MS.LinqService,True).sql | 22 + ...c(SqlServer.2022.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2022.MS.LinqService,True).sql | 11 + ...c(SqlServer.2022.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2022.MS.LinqService,True).sql | 13 + ...c(SqlServer.2022.MS.LinqService,False).sql | 11 + ...nc(SqlServer.2022.MS.LinqService,True).sql | 13 + ...c(SqlServer.2022.MS.LinqService,False).sql | 9 + ...nc(SqlServer.2022.MS.LinqService,True).sql | 11 + ...2022.MS.LinqService,False,False,False).sql | 16 + ....2022.MS.LinqService,False,False,True).sql | 16 + ....2022.MS.LinqService,False,True,False).sql | 16 + ...r.2022.MS.LinqService,False,True,True).sql | 16 + ...e1Async(SqlServer.2022.MS.LinqService).sql | 34 ++ ...leAsync(SqlServer.2022.MS.LinqService).sql | 31 ++ ...meAsync(SqlServer.2022.MS.LinqService).sql | 89 ++++ ...est(SqlServer.2022.MS.LinqService,100).sql | 18 + ...est(SqlServer.2022.MS.LinqService,200).sql | 18 + ...ord(SqlServer.2022.MS.LinqService,100).sql | 13 + ...ord(SqlServer.2022.MS.LinqService,200).sql | 13 + ...est(SqlServer.2022.MS.LinqService,100).sql | 15 + ...est(SqlServer.2022.MS.LinqService,200).sql | 15 + ...ord(SqlServer.2022.MS.LinqService,100).sql | 15 + ...ord(SqlServer.2022.MS.LinqService,200).sql | 15 + ...est(SqlServer.2022.MS.LinqService,100).sql | 21 + ...est(SqlServer.2022.MS.LinqService,200).sql | 21 + ...est(SqlServer.2022.MS.LinqService,100).sql | 12 + ...est(SqlServer.2022.MS.LinqService,200).sql | 12 + ...ord(SqlServer.2022.MS.LinqService,100).sql | 12 + ...ord(SqlServer.2022.MS.LinqService,200).sql | 12 + ...t2Async(SqlServer.2022.MS.LinqService).sql | 46 ++ ...t3Async(SqlServer.2022.MS.LinqService).sql | 48 ++ ...t4Async(SqlServer.2022.MS.LinqService).sql | 48 ++ ...meAsync(SqlServer.2022.MS.LinqService).sql | 69 +++ ...e1Async(SqlServer.2022.MS.LinqService).sql | 97 ++++ ...meAsync(SqlServer.2022.MS.LinqService).sql | 149 ++++++ ...e3Async(SqlServer.2022.MS.LinqService).sql | 97 ++++ ...3xAsync(SqlServer.2022.MS.LinqService).sql | 103 ++++ ...y1Async(SqlServer.2022.MS.LinqService).sql | 14 + ...y2Async(SqlServer.2022.MS.LinqService).sql | 14 + ...y4Async(SqlServer.2022.MS.LinqService).sql | 32 ++ ...cTest(SqlServer.2022.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2022.MS.LinqService,2).sql | 41 +- ...cTest(SqlServer.2022.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2022.MS.LinqService,2).sql | 41 +- ...ync(SqlServer.2022.MS.LinqService,100).sql | 24 + ...ync(SqlServer.2022.MS.LinqService,200).sql | 24 + ...ord(SqlServer.2022.MS.LinqService,100).sql | 24 + ...ord(SqlServer.2022.MS.LinqService,200).sql | 24 + ...cTest(SqlServer.2022.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2022.MS.LinqService,2).sql | 41 +- ...cTest(SqlServer.2022.MS.LinqService,1).sql | 41 +- ...cTest(SqlServer.2022.MS.LinqService,2).sql | 41 +- ...llAsync(SqlServer.2022.MS.LinqService).sql | 54 +++ ...onAsync(SqlServer.2022.MS.LinqService).sql | 53 ++ ...eryAsyn(SqlServer.2022.MS.LinqService).sql | 40 ++ ...bleAsyn(SqlServer.2022.MS.LinqService).sql | 38 ++ ...12Async(SqlServer.2022.MS.LinqService).sql | 13 + ...e1Async(SqlServer.2022.MS.LinqService).sql | 54 +++ ...e2Async(SqlServer.2022.MS.LinqService).sql | 54 +++ ...e4Async(SqlServer.2022.MS.LinqService).sql | 55 +++ ...n1Async(SqlServer.2022.MS.LinqService).sql | 41 ++ ...syncOld(SqlServer.2022.MS.LinqService).sql | 41 ++ ...meAsync(SqlServer.2022.MS.LinqService).sql | 105 ++++ ...x1Async(SqlServer.2022.MS.LinqService).sql | 55 +++ ...stAsync(SqlServer.2022.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2022.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2022.MS.LinqService).sql | 456 +----------------- ...stAsync(SqlServer.2022.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2022.MS.LinqService).sql | 451 +---------------- ...eUpdate(SqlServer.2022.MS.LinqService).sql | 450 +---------------- ...eRecord(SqlServer.2022.MS.LinqService).sql | 452 +---------------- ...houtOld(SqlServer.2022.MS.LinqService).sql | 450 +---------------- ...eUpdate(SqlServer.2022.MS.LinqService).sql | 449 +---------------- ...eRecord(SqlServer.2022.MS.LinqService).sql | 451 +---------------- ...stAsync(SqlServer.2022.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2022.MS.LinqService).sql | 454 +---------------- ...eRecord(SqlServer.2022.MS.LinqService).sql | 456 +----------------- ...stAsync(SqlServer.2022.MS.LinqService).sql | 23 + ...stAsync(SqlServer.2022.MS.LinqService).sql | 451 +---------------- ...eUpdate(SqlServer.2022.MS.LinqService).sql | 450 +---------------- ...eRecord(SqlServer.2022.MS.LinqService).sql | 452 +---------------- ...houtOld(SqlServer.2022.MS.LinqService).sql | 450 +---------------- ...eUpdate(SqlServer.2022.MS.LinqService).sql | 449 +---------------- ...eRecord(SqlServer.2022.MS.LinqService).sql | 451 +---------------- ...stAsync(SqlServer.2022.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2022.MS.LinqService).sql | 233 +-------- ...eRecord(SqlServer.2022.MS.LinqService).sql | 233 +-------- ...stAsync(SqlServer.2022.MS.LinqService).sql | 229 +-------- ...eRecord(SqlServer.2022.MS.LinqService).sql | 229 +-------- ...houtOld(SqlServer.2022.MS.LinqService).sql | 228 +-------- ...eRecord(SqlServer.2022.MS.LinqService).sql | 228 +-------- ...toAsync(SqlServer.2022.MS.LinqService).sql | 21 + ...stAsync(SqlServer.2022.MS.LinqService).sql | 22 + ...stAsync(SqlServer.2022.MS.LinqService).sql | 234 +-------- ...eRecord(SqlServer.2022.MS.LinqService).sql | 234 +-------- ...stAsync(SqlServer.2022.MS.LinqService).sql | 230 +-------- ...eRecord(SqlServer.2022.MS.LinqService).sql | 230 +-------- ...houtOld(SqlServer.2022.MS.LinqService).sql | 229 +-------- ...eRecord(SqlServer.2022.MS.LinqService).sql | 229 +-------- ...toAsync(SqlServer.2022.MS.LinqService).sql | 22 + ...inq.AsyncTests.Test(SqlServer.2022.MS).sql | 18 + ...nq.AsyncTests.Test1(SqlServer.2022.MS).sql | 9 + ...ncTests.TestForEach(SqlServer.2022.MS).sql | 9 + ...s.Linq.AsyncTests.Test(SqlServer.2022).sql | 18 + ....Linq.AsyncTests.Test1(SqlServer.2022).sql | 9 + ...AsyncTests.TestForEach(SqlServer.2022).sql | 9 + 312 files changed, 7986 insertions(+), 22538 deletions(-) create mode 100644 SqlServer.2022.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.LinqService,False).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.LinqService,True).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.LinqService,False).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.LinqService,True).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.LinqService,False).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.LinqService,True).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.LinqService,False).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.LinqService,True).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.LinqService,False).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.LinqService,True).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.LinqService,False).sql create mode 100644 SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.LinqService,True).sql create mode 100644 SqlServer.2022.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2022.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.MS.LinqService,False).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.MS.LinqService,True).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.MS.LinqService,False).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.MS.LinqService,True).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.MS.LinqService,False).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.MS.LinqService,True).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.MS.LinqService,False).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.MS.LinqService,True).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.MS.LinqService,False).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.MS.LinqService,True).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.MS.LinqService,False).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.MS.LinqService,True).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2022.MS.LinqService).sql create mode 100644 SqlServer.2022.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2022.MS).sql create mode 100644 SqlServer.2022.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2022.MS).sql create mode 100644 SqlServer.2022.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2022.MS).sql create mode 100644 SqlServer.2022/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2022).sql create mode 100644 SqlServer.2022/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2022).sql create mode 100644 SqlServer.2022/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2022).sql diff --git a/SqlServer.2022.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..f7609eb6d7c7 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.2022.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..506bd513b39e --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..0b65e12bcf8b --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2022.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..3bdf3bbd28e7 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2022.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..0b65e12bcf8b --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2022.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..3bdf3bbd28e7 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2022.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..124dbb41700b --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2022.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..1dc2c440d0f5 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2022.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2022.LinqService).sql index af6b6983e895..b19db08fc1a0 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2022.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..667fe5e1bee5 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2022.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..f92fe8d30012 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2022.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..f92fe8d30012 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2022.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..f1b1da5f3143 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2022.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..f1b1da5f3143 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2022.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..fa3943071db3 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2022.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..7f9efb3a68b9 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..07cfc54ab3d8 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2022.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..b1767530ec0f --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2022.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..b1767530ec0f --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2022.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..4f30212b7d0c --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2022.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..4f30212b7d0c --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2022.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..ca67f6530f8a --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2022.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..ca67f6530f8a --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2022.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2022.LinqService).sql index c91d5afa65e2..08e63a058d6d 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2022.LinqService).sql @@ -1,161 +1,15 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2022.LinqService).sql index c91d5afa65e2..d0f2c4457d6d 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2022.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2022.LinqService).sql index c91d5afa65e2..bd31dc50712c 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2022.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2022.LinqService).sql index c91d5afa65e2..bd31dc50712c 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2022.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2022.LinqService).sql index c91d5afa65e2..d0f2c4457d6d 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2022.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2022.LinqService).sql index c91d5afa65e2..840c2bdbe593 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2022.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2022.LinqService).sql index c91d5afa65e2..b8631b5f27fa 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2022.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2022.LinqService).sql index c91d5afa65e2..88e93a19ecad 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2022.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2022.LinqService).sql index c91d5afa65e2..88e93a19ecad 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2022.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2022.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..39c0844c82ce --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2022.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2022.LinqService).sql index 1fd92ea5f043..2a7e9e003af2 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2022.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2022 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022 diff --git a/SqlServer.2022.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2022.LinqService).sql index e2719c30f652..7819b4a5c87c 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2022.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2022 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022 diff --git a/SqlServer.2022.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..96db5e3d1007 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..2c4c58a00c85 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2022.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..5d0f2c6b6ffc --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2022.LinqService).sql index db32bcbaa384..83a04846b871 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2022.LinqService).sql @@ -1,43 +1,11 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DynamicParent] +-- SqlServer.2022 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2022.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2022.LinqService).sql index 1cce868cf3fb..aa440acab8dc 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2022.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2022 (asynchronously) diff --git a/SqlServer.2022.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2022.LinqService).sql index 5e39c8130861..33b3481b3847 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2022.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2022 (asynchronously) diff --git a/SqlServer.2022.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..db3122e3423d --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2022.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..c1f794747c79 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2022.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..7469b2fb8335 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2022.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..fdf6037c07ed --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2022.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..cc06abe73e47 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2022.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.LinqService,False).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.LinqService,False).sql new file mode 100644 index 000000000000..fe221e097d67 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.LinqService,True).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.LinqService,True).sql new file mode 100644 index 000000000000..fe221e097d67 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.LinqService,False).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.LinqService,False).sql new file mode 100644 index 000000000000..fe221e097d67 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.LinqService,True).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.LinqService,True).sql new file mode 100644 index 000000000000..fe221e097d67 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2022.LinqService).sql index ea631544c4ce..6755f90388b3 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2022.LinqService).sql @@ -1,75 +1,13 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SqlServer.2022 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.LinqService,False).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.LinqService,False).sql index a4889399a336..08ac52af8e8c 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.LinqService,False).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.LinqService,True).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.LinqService,True).sql index 3621668e7c86..048aaa4d58ab 100644 --- a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.LinqService,True).sql +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.LinqService,False).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.LinqService,False).sql new file mode 100644 index 000000000000..a4b9b4ab394a --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.LinqService,True).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.LinqService,True).sql new file mode 100644 index 000000000000..a4b9b4ab394a --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.LinqService,False).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.LinqService,False).sql new file mode 100644 index 000000000000..7c425be80947 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.LinqService,True).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.LinqService,True).sql new file mode 100644 index 000000000000..59260a50d70a --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.LinqService,False).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.LinqService,False).sql new file mode 100644 index 000000000000..03746ee48ffe --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.LinqService,True).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.LinqService,True).sql new file mode 100644 index 000000000000..adad60d6e80a --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.LinqService,False).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.LinqService,False).sql new file mode 100644 index 000000000000..f0ba6c5311e4 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.LinqService,True).sql b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.LinqService,True).sql new file mode 100644 index 000000000000..7bb30301421b --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,False,False).sql b/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,False,False).sql index b59b9f829929..35386d7eb090 100644 --- a/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,False,False).sql +++ b/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2022 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,False,True).sql b/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,False,True).sql index 18cfab10b7b5..665146f45910 100644 --- a/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,False,True).sql +++ b/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,False,True).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2022 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,True,False).sql b/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,True,False).sql index f14fbb53dba3..44a782802eb3 100644 --- a/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,True,False).sql +++ b/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,True,False).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2022 (asynchronously) + +CREATE TABLE [TestData]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,True,True).sql b/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,True,True).sql index 570866db9aa9..7c854832f3d0 100644 --- a/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,True,True).sql +++ b/SqlServer.2022.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.LinqService,False,True,True).sql @@ -19,3 +19,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2022 (asynchronously) + +CREATE TABLE [TestData].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..b0379fa6129c --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2022.LinqService).sql index d147b921fa77..0aeea7df4649 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2022.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2022 SELECT @@ -7,3 +33,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..7f47794ecd64 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2022.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.LinqService,100).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.LinqService,100).sql index 0a214300aec8..681621497567 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.LinqService,100).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.LinqService,100).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.LinqService,200).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.LinqService,200).sql index 0a214300aec8..681621497567 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.LinqService,200).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.LinqService,200).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.LinqService,100).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.LinqService,100).sql index 5dc0fdeb7b40..05480284ed1d 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.LinqService,100).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.LinqService,200).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.LinqService,200).sql index 5dc0fdeb7b40..05480284ed1d 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.LinqService,200).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.LinqService,100).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.LinqService,100).sql index 0a214300aec8..91dba6f3c895 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.LinqService,100).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.LinqService,200).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.LinqService,200).sql index 0a214300aec8..f685ecf443ac 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.LinqService,200).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,100).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,100).sql index 5dc0fdeb7b40..75c121463000 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,100).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,200).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,200).sql index 5dc0fdeb7b40..c58632c9d3e8 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,200).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.LinqService,100).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.LinqService,100).sql index 2f467947f933..6b1c6b4b23b7 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.LinqService,100).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2022 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.LinqService,200).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.LinqService,200).sql index 2f467947f933..aaa12324398a 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.LinqService,200).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2022 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.LinqService,100).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.LinqService,100).sql index 0a214300aec8..f4389b482c9c 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.LinqService,100).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.LinqService,200).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.LinqService,200).sql index 0a214300aec8..f4389b482c9c 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.LinqService,200).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,100).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,100).sql index 5dc0fdeb7b40..fab965ffd1fe 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,100).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,200).sql b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,200).sql index 5dc0fdeb7b40..fab965ffd1fe 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,200).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..544d2dda39fd --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..31f08094a433 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..31f08094a433 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2022.LinqService).sql index 138bb4b57080..cfe33fff242c 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2022.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2022 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,32 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2022.LinqService).sql index 44e79131f2c9..b9ad4aa3a32d 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2022.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..36b7d3c92b44 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2022.LinqService).sql @@ -0,0 +1,149 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2022.LinqService).sql index 44e79131f2c9..e9ad9fe6d397 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2022.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2022.LinqService).sql index 44e79131f2c9..f85d9aba0083 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2022.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2022.LinqService).sql index ed1f339837de..e9a6ef222527 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2022.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2022 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2022.LinqService).sql index ed1f339837de..e9a6ef222527 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2022.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2022 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2022.LinqService).sql index 8f95475e3c24..8200c099c716 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2022.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2022 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2022 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.LinqService,1).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.LinqService,1).sql index 8bdd74a87baa..0db2fa682532 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.LinqService,1).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022 +-- SqlServer.2022 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.LinqService,2).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.LinqService,2).sql index 8bdd74a87baa..590996c7da86 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.LinqService,2).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022 +-- SqlServer.2022 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,1).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,1).sql index 8bdd74a87baa..22ea25c6c3ab 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,1).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022 +-- SqlServer.2022 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,2).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,2).sql index 8bdd74a87baa..a7d3b1222ff0 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,2).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022 +-- SqlServer.2022 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.LinqService,100).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.LinqService,100).sql index 20a258165c39..a0d76bfcfd38 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.LinqService,100).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2022 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.LinqService,200).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.LinqService,200).sql index 502e017a02c9..b6d0abe3bc15 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.LinqService,200).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2022 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.LinqService,100).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.LinqService,100).sql index 6ee623ba3f64..591e2ae6179e 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.LinqService,100).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2022 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.LinqService,200).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.LinqService,200).sql index 55f1d3987a13..329921da3a25 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.LinqService,200).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2022 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.LinqService,1).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.LinqService,1).sql index 8bdd74a87baa..12ad175cbcef 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.LinqService,1).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022 +-- SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.LinqService,2).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.LinqService,2).sql index 8bdd74a87baa..6fb8079b4512 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.LinqService,2).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022 +-- SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,1).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,1).sql index 8bdd74a87baa..22ea25c6c3ab 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,1).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022 +-- SqlServer.2022 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,2).sql b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,2).sql index 8bdd74a87baa..a7d3b1222ff0 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,2).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022 +-- SqlServer.2022 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2022.LinqService).sql index bb3a8a6e2d37..d35275240540 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2022.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2022 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2022.LinqService).sql index bb3a8a6e2d37..daa4f3495c4d 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2022.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2022 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2022.LinqService).sql index d8c82fd0cf35..7b8e67fa2b8c 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2022.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2022 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2022 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2022.LinqService).sql index d8c82fd0cf35..2d16ee681ff1 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2022.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2022 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2022 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..0c78efb4270b --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..2b9944cd2671 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..2b9944cd2671 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..610e5fd2b1f5 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..25bd8e2281e2 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2022.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..25bd8e2281e2 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2022.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2022.LinqService).sql new file mode 100644 index 000000000000..3f0baf13c366 --- /dev/null +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2022.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2022.LinqService).sql index 6c7725124d50..f26cff7f0332 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2022.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql index 664a14ef32a4..ea988a72d860 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2022 SELECT diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql index ddb0782d386b..d949d229d57d 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql index ddb0782d386b..635fcbe6dd07 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2022.LinqService).sql index 30af8b052b37..f503ff111ea8 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2022.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2022 SELECT diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql index ddb0782d386b..f896b392cee1 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.LinqService).sql index ddb0782d386b..b886419d57e9 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql index ddb0782d386b..8ff2554bea16 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql index ddb0782d386b..bca8850d29a3 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.LinqService).sql index ddb0782d386b..ed8772d91c8e 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql index ddb0782d386b..6349bc851a0a 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql index 664a14ef32a4..ea988a72d860 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2022 SELECT diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql index ddb0782d386b..d949d229d57d 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql index ddb0782d386b..635fcbe6dd07 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2022.LinqService).sql index 30af8b052b37..f503ff111ea8 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2022.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2022 SELECT diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql index ddb0782d386b..f896b392cee1 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.LinqService).sql index ddb0782d386b..b886419d57e9 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql index ddb0782d386b..8ff2554bea16 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql index ddb0782d386b..bca8850d29a3 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.LinqService).sql index ddb0782d386b..ed8772d91c8e 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql index ddb0782d386b..6349bc851a0a 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql index ce9f0af79df8..12cf85d0e9ab 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2022 SELECT diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql index 0f1af70e3387..5ee4b1dfcb2d 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql index 0f1af70e3387..7a3b7371754c 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql index 0f1af70e3387..88b2fc3ece6c 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql index 0f1af70e3387..12a3ef83a935 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql index 0f1af70e3387..bba62724c3f9 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.LinqService).sql index 0f1af70e3387..9de40db5c5a9 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2022.LinqService).sql index ce9f0af79df8..5f8504eb7f87 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2022.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2022 SELECT diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql index ce9f0af79df8..532983d1ae7e 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2022.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2022 SELECT diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql index 0f1af70e3387..02a043d295f4 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2022.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql index 0f1af70e3387..ec885ffa1608 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql index 0f1af70e3387..c1900ac0b9c0 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2022.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql index 0f1af70e3387..1d035a54ded5 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql index 0f1af70e3387..2810ad0a1a85 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.LinqService).sql index 0f1af70e3387..1440b719c447 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2022.LinqService).sql b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2022.LinqService).sql index ce9f0af79df8..6222c6397d11 100644 --- a/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2022.LinqService).sql +++ b/SqlServer.2022.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2022.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2022 SELECT diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..f000a5572790 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..cedbc9e98e7e --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..e2e13dd883e7 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..403f9350c957 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..e2e13dd883e7 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..403f9350c957 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..be5773105564 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..999299463545 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2022.MS.LinqService).sql index 1a13ff2a3cf4..5deae967939c 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.2022.MS.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..2023da82f6a3 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..a7789767a392 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..a7789767a392 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..96de62d15d76 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..96de62d15d76 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..efd2a6005f11 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..7fe4c4578107 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..1f2ed610f306 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..a3e1c9482cac --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..a3e1c9482cac --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..cdbd33341e19 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..cdbd33341e19 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..41e8d3659610 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..41e8d3659610 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2022.MS.LinqService).sql index ee674eab9197..562d53d4c0d2 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.2022.MS.LinqService).sql @@ -1,161 +1,15 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2022.MS.LinqService).sql index ee674eab9197..6bb9468db8f1 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.2022.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2022.MS.LinqService).sql index ee674eab9197..11d4abe7c8fd 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.2022.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2022.MS.LinqService).sql index ee674eab9197..11d4abe7c8fd 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.2022.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2022.MS.LinqService).sql index ee674eab9197..6bb9468db8f1 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.2022.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2022.MS.LinqService).sql index ee674eab9197..040780bb265f 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.2022.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2022.MS.LinqService).sql index ee674eab9197..f2bee203fc38 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.2022.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2022.MS.LinqService).sql index ee674eab9197..39ec7b876a78 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.2022.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2022.MS.LinqService).sql index ee674eab9197..39ec7b876a78 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.2022.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..66ec1b5e219f --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2022.MS.LinqService).sql index 671c5a904737..aabc14933ec1 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.2022.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2022.MS.LinqService).sql index a9ae3c4161a1..1da0c8151c1b 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.2022.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..6e1b9b6241fc --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..e192987e4be4 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..c0ebe23287ac --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2022.MS.LinqService).sql index 409382a9c14f..70122b6ae7e5 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.2022.MS.LinqService).sql @@ -1,43 +1,11 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DynamicParent] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2022.MS.LinqService).sql index fa2fee59abd2..5556b6454d8e 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.2022.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.2022.MS SqlServer.2022 (asynchronously) diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2022.MS.LinqService).sql index ebb17c873134..4df84bfab856 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.2022.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.2022.MS SqlServer.2022 (asynchronously) diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..cb6978d3d3bf --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..595881514714 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..51213885ea8a --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..e4948c9dcb18 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..a964aef6a29b --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.MS.LinqService,False).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.MS.LinqService,False).sql new file mode 100644 index 000000000000..5a374fc54680 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.MS.LinqService,True).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.MS.LinqService,True).sql new file mode 100644 index 000000000000..5a374fc54680 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.2022.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.MS.LinqService,False).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.MS.LinqService,False).sql new file mode 100644 index 000000000000..5a374fc54680 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.MS.LinqService,True).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.MS.LinqService,True).sql new file mode 100644 index 000000000000..5a374fc54680 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.2022.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2022.MS.LinqService).sql index fae170163446..7e70b2cfdd38 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.2022.MS.LinqService).sql @@ -1,75 +1,13 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.MS.LinqService,False).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.MS.LinqService,False).sql index e3c1b9c86cd0..7b13d8828ba6 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.MS.LinqService,False).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.MS.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.MS.LinqService,True).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.MS.LinqService,True).sql index 2ec4b553121e..7386411ceee9 100644 --- a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.MS.LinqService,True).sql +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.2022.MS.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.MS.LinqService,False).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.MS.LinqService,False).sql new file mode 100644 index 000000000000..4220515ce889 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.MS.LinqService,True).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.MS.LinqService,True).sql new file mode 100644 index 000000000000..4220515ce889 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.2022.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.MS.LinqService,False).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.MS.LinqService,False).sql new file mode 100644 index 000000000000..c9f4901e45c3 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.MS.LinqService,True).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.MS.LinqService,True).sql new file mode 100644 index 000000000000..b7492a6f662c --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.2022.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.MS.LinqService,False).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.MS.LinqService,False).sql new file mode 100644 index 000000000000..7ed9c70ed0af --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.MS.LinqService,True).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.MS.LinqService,True).sql new file mode 100644 index 000000000000..f1463c3a81db --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.2022.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.MS.LinqService,False).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.MS.LinqService,False).sql new file mode 100644 index 000000000000..703ddab74df0 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.MS.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.MS.LinqService,True).sql b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.MS.LinqService,True).sql new file mode 100644 index 000000000000..66b81d062190 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.2022.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,False,False).sql b/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,False,False).sql index 77fc8a111aaf..13f69ed5addd 100644 --- a/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,False,False).sql +++ b/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,False,True).sql b/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,False,True).sql index 379aa7dd0438..4778056161e7 100644 --- a/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,False,True).sql +++ b/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,False,True).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,True,False).sql b/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,True,False).sql index 4b6b026ffccd..6eadb19894c0 100644 --- a/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,True,False).sql +++ b/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,True,False).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +CREATE TABLE [TestDataMS]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,True,True).sql b/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,True,True).sql index 8f0858973f4a..7377227618b1 100644 --- a/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,True,True).sql +++ b/SqlServer.2022.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.2022.MS.LinqService,False,True,True).sql @@ -19,3 +19,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +CREATE TABLE [TestDataMS].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..9df437361313 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2022.MS.LinqService).sql index e7a92a3e80af..9c99a46087b0 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.2022.MS.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 SELECT @@ -7,3 +33,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..4868dccd2d23 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.MS.LinqService,100).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.MS.LinqService,100).sql index 84334620b393..6599711cbac6 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.MS.LinqService,100).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.MS.LinqService,100).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.MS.LinqService,200).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.MS.LinqService,200).sql index 84334620b393..6599711cbac6 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.MS.LinqService,200).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.2022.MS.LinqService,200).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,100).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,100).sql index b37cf12d6c09..8d8a7adddaf1 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,100).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,200).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,200).sql index b37cf12d6c09..8d8a7adddaf1 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,200).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.MS.LinqService,100).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.MS.LinqService,100).sql index 84334620b393..2093428e03fa 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.MS.LinqService,100).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.MS.LinqService,200).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.MS.LinqService,200).sql index 84334620b393..22034ae18c7e 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.MS.LinqService,200).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.2022.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,100).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,100).sql index b37cf12d6c09..cce2af56768e 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,100).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,200).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,200).sql index b37cf12d6c09..a72bb6993361 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,200).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.MS.LinqService,100).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.MS.LinqService,100).sql index 1296d663e801..b6e549136b33 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.MS.LinqService,100).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.MS.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.MS.LinqService,200).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.MS.LinqService,200).sql index 1296d663e801..99571a716e75 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.MS.LinqService,200).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.2022.MS.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.MS.LinqService,100).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.MS.LinqService,100).sql index 84334620b393..b4b0d9485b15 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.MS.LinqService,100).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.MS.LinqService,200).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.MS.LinqService,200).sql index 84334620b393..b4b0d9485b15 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.MS.LinqService,200).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.2022.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,100).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,100).sql index b37cf12d6c09..0468be841d97 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,100).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,200).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,200).sql index b37cf12d6c09..0468be841d97 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,200).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.2022.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..408227dc5dfa --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..ce561ad97057 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..ce561ad97057 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2022.MS.LinqService).sql index 39961f4e7592..774908764d57 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.2022.MS.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,32 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2022.MS.LinqService).sql index 89d604d71cf9..f54adb21b353 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.2022.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..e2ddeb3151fa --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,149 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2022.MS.LinqService).sql index 89d604d71cf9..fd5557d3f213 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.2022.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2022.MS.LinqService).sql index 89d604d71cf9..c03a7d138b27 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.2022.MS.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2022.MS.LinqService).sql index 8f3958650643..beaf811952b0 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.2022.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2022.MS.LinqService).sql index 8f3958650643..beaf811952b0 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.2022.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2022.MS.LinqService).sql index ed239af4920e..98b8422c4c63 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.2022.MS.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,1).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,1).sql index 9d2f1cdd34f6..6aa02f10278f 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,1).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,2).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,2).sql index 9d2f1cdd34f6..509d70eccec0 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,2).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,1).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,1).sql index 9d2f1cdd34f6..c817d7ceabbe 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,1).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,2).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,2).sql index 9d2f1cdd34f6..2b5e5c571b6f 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,2).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.MS.LinqService,100).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.MS.LinqService,100).sql index cfeaa6944456..90b66c4842f9 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.MS.LinqService,100).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.MS.LinqService,200).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.MS.LinqService,200).sql index c143dd3808e8..a3fabf9c009c 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.MS.LinqService,200).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.2022.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.MS.LinqService,100).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.MS.LinqService,100).sql index d0dce903a6e9..deb85cba2b8b 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.MS.LinqService,100).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.MS.LinqService,200).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.MS.LinqService,200).sql index fee132ae2b11..0d50b96539d2 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.MS.LinqService,200).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.2022.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,1).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,1).sql index 9d2f1cdd34f6..45b8a5101ea5 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,1).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,2).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,2).sql index 9d2f1cdd34f6..4b3d31da3588 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,2).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.2022.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,1).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,1).sql index 9d2f1cdd34f6..c817d7ceabbe 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,1).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,2).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,2).sql index 9d2f1cdd34f6..2b5e5c571b6f 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,2).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.2022.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2022.MS.LinqService).sql index 673c3c05db69..87fd2ba3f80c 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.2022.MS.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2022.MS.LinqService).sql index 673c3c05db69..42f53acaeadc 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.2022.MS.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2022.MS.LinqService).sql index 199855d06824..170b170c7b36 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.2022.MS.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2022.MS.LinqService).sql index 199855d06824..b62d0c02df30 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.2022.MS.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.2022.MS SqlServer.2022 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..6d9ed0acd14e --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..774db0e2e60d --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..774db0e2e60d --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..b9f5d8d2adac --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..343c1b389905 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..343c1b389905 --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2022.MS.LinqService).sql new file mode 100644 index 000000000000..ed3f2fe5f81e --- /dev/null +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.2022.MS.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2022.MS.LinqService).sql index 292eb9667fb8..7eadda206cfc 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.2022.MS.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql index 77abb21c4e31..f14fbf85c1a2 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 SELECT diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..3589b1650b02 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..1b0d6c501db7 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql index f85939f76f6b..01374b752fc4 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 SELECT diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..a67388cdb286 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..c6b284d69990 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..c031a72a63dd 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..3d27e8f97c3c 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..fa490221ba9b 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..6e33ecfffa52 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql index 77abb21c4e31..f14fbf85c1a2 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 SELECT diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..3589b1650b02 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..1b0d6c501db7 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql index f85939f76f6b..01374b752fc4 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 SELECT diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..a67388cdb286 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..c6b284d69990 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..c031a72a63dd 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..3d27e8f97c3c 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..fa490221ba9b 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql index eccd1c1e7e97..6e33ecfffa52 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.2022.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql index 0e3a7d284c53..8b8ffacbf873 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 SELECT diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql index 45db78841755..36d5e0df156b 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql index 45db78841755..f06b204f94d7 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql index 45db78841755..5d846ef9c6b2 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql index 45db78841755..c7808790767f 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql index 45db78841755..bc7a3d2e128c 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.MS.LinqService).sql index 45db78841755..9ebb696ed04d 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.MS.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2022.MS.LinqService).sql index 0e3a7d284c53..6fbce5ec51f4 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.2022.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 SELECT diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql index 0e3a7d284c53..1b77c4e3c69d 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 SELECT diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql index 45db78841755..09427a69bcc5 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql index 45db78841755..727afb07b8d8 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql index 45db78841755..daa03b06528c 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.2022.MS.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql index 45db78841755..d6e0e42dc8df 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.2022.MS.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql index 45db78841755..704f552cc71b 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.2022.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.MS.LinqService).sql index 45db78841755..c063eb669616 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.2022.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.2022.MS SqlServer.2022 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2022.MS.LinqService).sql b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2022.MS.LinqService).sql index 0e3a7d284c53..cb5767bcb52f 100644 --- a/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2022.MS.LinqService).sql +++ b/SqlServer.2022.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.2022.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.2022.MS SqlServer.2022 SELECT diff --git a/SqlServer.2022.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2022.MS).sql b/SqlServer.2022.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2022.MS).sql new file mode 100644 index 000000000000..4a7b1eb8f282 --- /dev/null +++ b/SqlServer.2022.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2022.MS).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2022.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2022.MS).sql b/SqlServer.2022.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2022.MS).sql new file mode 100644 index 000000000000..e2e13dd883e7 --- /dev/null +++ b/SqlServer.2022.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2022.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2022.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2022.MS).sql b/SqlServer.2022.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2022.MS).sql new file mode 100644 index 000000000000..e2e13dd883e7 --- /dev/null +++ b/SqlServer.2022.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2022.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2022.MS SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2022/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2022).sql b/SqlServer.2022/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2022).sql new file mode 100644 index 000000000000..ef76c922aad4 --- /dev/null +++ b/SqlServer.2022/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.2022).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2022/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2022).sql b/SqlServer.2022/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2022).sql new file mode 100644 index 000000000000..0b65e12bcf8b --- /dev/null +++ b/SqlServer.2022/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.2022).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.2022/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2022).sql b/SqlServer.2022/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2022).sql new file mode 100644 index 000000000000..0b65e12bcf8b --- /dev/null +++ b/SqlServer.2022/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.2022).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.2022 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From 7b73172c6dc2dc3567ec71786a393ece8b0f6240 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 21:59:48 +0100 Subject: [PATCH 19/40] [Linux / Oracle 11g XE] baselines --- ...l4Async(Oracle.11.Managed.LinqService).sql | 18 ++ ...y2Async(Oracle.11.Managed.LinqService).sql | 30 +++ ...le1Test(Oracle.11.Managed.LinqService).sql | 9 + ...le2Test(Oracle.11.Managed.LinqService).sql | 11 + ...st1Test(Oracle.11.Managed.LinqService).sql | 9 + ...st2Test(Oracle.11.Managed.LinqService).sql | 11 + ...yncTest(Oracle.11.Managed.LinqService).sql | 18 ++ ...yncTest(Oracle.11.Managed.LinqService).sql | 14 ++ ...kipTest(Oracle.11.Managed.LinqService).sql | 34 +++ ...Default(Oracle.11.Managed.LinqService).sql | 20 ++ ...yncTest(Oracle.11.Managed.LinqService).sql | 21 ++ ...yncTest(Oracle.11.Managed.LinqService).sql | 21 ++ ...stAsync(Oracle.11.Managed.LinqService).sql | 40 ++++ ...tAsync2(Oracle.11.Managed.LinqService).sql | 40 ++++ ...ncdTest(Oracle.11.Managed.LinqService).sql | 25 ++ ...t3Async(Oracle.11.Managed.LinqService).sql | 26 +++ ...stAsync(Oracle.11.Managed.LinqService).sql | 36 +++ ...stAsync(Oracle.11.Managed.LinqService).sql | 24 ++ ...tAsync2(Oracle.11.Managed.LinqService).sql | 24 ++ ...tAsync1(Oracle.11.Managed.LinqService).sql | 26 +++ ...tAsync2(Oracle.11.Managed.LinqService).sql | 26 +++ ...stAsync(Oracle.11.Managed.LinqService).sql | 24 ++ ...tAsync2(Oracle.11.Managed.LinqService).sql | 24 ++ ...teAsync(Oracle.11.Managed.LinqService).sql | 197 ++-------------- ...teAsync(Oracle.11.Managed.LinqService).sql | 191 +--------------- ...teAsync(Oracle.11.Managed.LinqService).sql | 192 +--------------- ...teAsync(Oracle.11.Managed.LinqService).sql | 192 +--------------- ...teAsync(Oracle.11.Managed.LinqService).sql | 191 +--------------- ...orAsync(Oracle.11.Managed.LinqService).sql | 191 +--------------- ...orAsync(Oracle.11.Managed.LinqService).sql | 191 +--------------- ...teAsync(Oracle.11.Managed.LinqService).sql | 192 +--------------- ...teAsync(Oracle.11.Managed.LinqService).sql | 192 +--------------- ...t1Async(Oracle.11.Managed.LinqService).sql | 19 ++ ...ntAsync(Oracle.11.Managed.LinqService).sql | 97 ++++++++ ...edAsync(Oracle.11.Managed.LinqService).sql | 80 +++++++ ...t1Async(Oracle.11.Managed.LinqService).sql | 8 + ...t2Async(Oracle.11.Managed.LinqService).sql | 10 + ...x1Async(Oracle.11.Managed.LinqService).sql | 16 ++ ...sue4602(Oracle.11.Managed.LinqService).sql | 194 +--------------- ...7_Async(Oracle.11.Managed.LinqService).sql | 29 +++ ...saction(Oracle.11.Managed.LinqService).sql | 29 +++ ...onAsync(Oracle.11.Managed.LinqService).sql | 25 ++ ...t1Async(Oracle.11.Managed.LinqService).sql | 11 + ...18Async(Oracle.11.Managed.LinqService).sql | 14 ++ ...r1Async(Oracle.11.Managed.LinqService).sql | 7 + ...132Test(Oracle.11.Managed.LinqService).sql | 213 ++++++++++++++++++ ...c(Oracle.11.Managed.LinqService,False).sql | 34 +++ ...nc(Oracle.11.Managed.LinqService,True).sql | 34 +++ ...c(Oracle.11.Managed.LinqService,False).sql | 34 +++ ...nc(Oracle.11.Managed.LinqService,True).sql | 34 +++ ...p1Async(Oracle.11.Managed.LinqService).sql | 122 +++------- ...c(Oracle.11.Managed.LinqService,False).sql | 22 ++ ...nc(Oracle.11.Managed.LinqService,True).sql | 26 +++ ...c(Oracle.11.Managed.LinqService,False).sql | 13 ++ ...nc(Oracle.11.Managed.LinqService,True).sql | 13 ++ ...c(Oracle.11.Managed.LinqService,False).sql | 11 + ...nc(Oracle.11.Managed.LinqService,True).sql | 13 ++ ...c(Oracle.11.Managed.LinqService,False).sql | 11 + ...nc(Oracle.11.Managed.LinqService,True).sql | 13 ++ ...c(Oracle.11.Managed.LinqService,False).sql | 11 + ...nc(Oracle.11.Managed.LinqService,True).sql | 13 ++ ...Managed.LinqService,False,False,False).sql | 23 ++ ....Managed.LinqService,False,False,True).sql | 23 ++ ....Managed.LinqService,False,True,False).sql | 23 ++ ...1.Managed.LinqService,False,True,True).sql | 23 ++ ....Managed.LinqService,True,False,False).sql | 23 ++ ...1.Managed.LinqService,True,False,True).sql | 23 ++ ...1.Managed.LinqService,True,True,False).sql | 23 ++ ...11.Managed.LinqService,True,True,True).sql | 23 ++ ...e1Async(Oracle.11.Managed.LinqService).sql | 77 +++++++ ...leAsync(Oracle.11.Managed.LinqService).sql | 53 +++++ ...meAsync(Oracle.11.Managed.LinqService).sql | 133 +++++++++++ ...t2Async(Oracle.11.Managed.LinqService).sql | 44 ++++ ...t3Async(Oracle.11.Managed.LinqService).sql | 46 ++++ ...t4Async(Oracle.11.Managed.LinqService).sql | 46 ++++ ...meAsync(Oracle.11.Managed.LinqService).sql | 112 +++++++++ ...e1Async(Oracle.11.Managed.LinqService).sql | 97 ++++++++ ...meAsync(Oracle.11.Managed.LinqService).sql | 163 ++++++++++++++ ...e3Async(Oracle.11.Managed.LinqService).sql | 97 ++++++++ ...3xAsync(Oracle.11.Managed.LinqService).sql | 103 +++++++++ ...y1Async(Oracle.11.Managed.LinqService).sql | 15 ++ ...y2Async(Oracle.11.Managed.LinqService).sql | 15 ++ ...y4Async(Oracle.11.Managed.LinqService).sql | 34 +++ ...eryAsyn(Oracle.11.Managed.LinqService).sql | 33 +++ ...bleAsyn(Oracle.11.Managed.LinqService).sql | 31 +++ ...nsAsync(Oracle.11.Managed.LinqService).sql | 127 ++++++++--- ...llAsync(Oracle.11.Managed.LinqService).sql | 131 +++++------ ...rtAsync(Oracle.11.Managed.LinqService).sql | 126 +++++------ ...stAsync(Oracle.11.Managed.LinqService).sql | 85 ++++--- ...nc(Oracle.11.Managed.LinqService,null).sql | 79 ++++--- ...ync(Oracle.11.Managed.LinqService,one).sql | 79 ++++--- ...ync(Oracle.11.Managed.LinqService,two).sql | 79 ++++--- ...nc(Oracle.11.Managed.LinqService,null).sql | 79 ++++--- ...ync(Oracle.11.Managed.LinqService,one).sql | 79 ++++--- ...ync(Oracle.11.Managed.LinqService,two).sql | 79 ++++--- ...nc(Oracle.11.Managed.LinqService,null).sql | 79 ++++--- ...ync(Oracle.11.Managed.LinqService,one).sql | 79 ++++--- ...ync(Oracle.11.Managed.LinqService,two).sql | 79 ++++--- ...12Async(Oracle.11.Managed.LinqService).sql | 28 +++ ...e1Async(Oracle.11.Managed.LinqService).sql | 54 +++++ ...e2Async(Oracle.11.Managed.LinqService).sql | 54 +++++ ...e4Async(Oracle.11.Managed.LinqService).sql | 63 ++++++ ...n1Async(Oracle.11.Managed.LinqService).sql | 47 ++++ ...syncOld(Oracle.11.Managed.LinqService).sql | 47 ++++ ...meAsync(Oracle.11.Managed.LinqService).sql | 152 +++++++++++++ ...x1Async(Oracle.11.Managed.LinqService).sql | 55 +++++ ...inq.AsyncTests.Test(Oracle.11.Managed).sql | 18 ++ ...nq.AsyncTests.Test1(Oracle.11.Managed).sql | 9 + ...ncTests.TestForEach(Oracle.11.Managed).sql | 9 + 109 files changed, 3958 insertions(+), 2457 deletions(-) create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.11.Managed.LinqService,False).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.11.Managed.LinqService,True).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.11.Managed.LinqService,False).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.11.Managed.LinqService,True).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.11.Managed.LinqService,False).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.11.Managed.LinqService,True).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.11.Managed.LinqService,False).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.11.Managed.LinqService,True).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.11.Managed.LinqService,False).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.11.Managed.LinqService,True).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.11.Managed.LinqService,False).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.11.Managed.LinqService,True).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.11.Managed.LinqService).sql create mode 100644 Oracle.11.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.11.Managed).sql create mode 100644 Oracle.11.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.11.Managed).sql create mode 100644 Oracle.11.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.11.Managed).sql diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..a5e5be56f66a --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" <= 3 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..a77dba470c1e --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT DISTINCT + a_Parent1."ParentID" + FROM + "Child" t1 + INNER JOIN "Parent" a_Parent1 ON t1."ParentID" = a_Parent1."ParentID" + ) m_1 + INNER JOIN "Child" d + INNER JOIN "Parent" a_Parent1_1 ON d."ParentID" = a_Parent1_1."ParentID" + ON m_1."ParentID" = a_Parent1_1."ParentID" + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + a_Parent1."ParentID" +FROM + "Child" t1 + INNER JOIN "Parent" a_Parent1 ON t1."ParentID" = a_Parent1."ParentID" +GROUP BY + a_Parent1."ParentID" + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..63f6faf4c674 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..e814cb5f5501 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..63f6faf4c674 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..e814cb5f5501 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..7d7c5084bf6d --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +SELECT + CASE + WHEN :ID IN ( + SELECT + t1."PersonID" + FROM + "Person" t1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..2e5be496645c --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."PersonID" = 1 AND ROWNUM <= 1 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.11.Managed.LinqService).sql index a2b391a107e0..64f9ef484662 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.11.Managed.LinqService).sql @@ -32,3 +32,37 @@ WHERE ORDER BY t3."ParentID" +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @skip Int32 +SET @skip = 1 +DECLARE @take Int32 +SET @take = 2 + +SELECT + t3."ParentID", + t3."Value1" +FROM + ( + SELECT + t2."ParentID", + t2."Value1", + ROWNUM as RN + FROM + ( + SELECT + t1."ParentID", + t1."Value1" + FROM + "Parent" t1 + ORDER BY + t1."ParentID" + ) t2 + WHERE + ROWNUM <= (:skip + :take) + ) t3 +WHERE + t3.RN > :skip +ORDER BY + t3."ParentID" + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..5383487b0a73 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1 +DECLARE @p_1 Int32 +SET @p_1 = 2 +DECLARE @p_2 Int32 +SET @p_2 = 3 +DECLARE @param Int32 +SET @param = 4 + +SELECT + o."ParentID", + o."Value1" +FROM + "Parent" o +WHERE + (o."ParentID" IN (:p, :p_1, :p_2) OR o."ParentID" = :param) AND + ROWNUM <= 1 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..6363b60a4b52 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..6363b60a4b52 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..8a44717fdbd4 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..8a44717fdbd4 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..3013684f3d48 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + t1."ParentID", + t1."Value1" +FROM + ( + SELECT + x."ParentID", + x."Value1" + FROM + "Parent" x + WHERE + x."ParentID" = :p + ORDER BY + x."ParentID" DESC + ) t1 +WHERE + ROWNUM <= 1 +ORDER BY + t1."ParentID" DESC + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..3b56ce207b46 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p AND ROWNUM <= :p + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p AND ROWNUM <= :p + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..7f071b38bcc5 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..d45dd1f9effd --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..d45dd1f9effd --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..aec48ee48ed5 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p AND ROWNUM <= 1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p AND ROWNUM <= 1 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..aec48ee48ed5 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p AND ROWNUM <= 1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p AND ROWNUM <= 1 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..9ef10f4c76d4 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..9ef10f4c76d4 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.11.Managed.LinqService).sql index de875a69852f..5abd2af03091 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.11.Managed.LinqService).sql @@ -1,183 +1,20 @@ BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "AsyncDataTable" c_1 + WHERE + c_1."Id" = :p ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; + THEN 1 + ELSE 0 + END +FROM SYS.DUAL diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.11.Managed.LinqService).sql index de875a69852f..549ce4dd8f04 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.11.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.11.Managed.LinqService).sql index de875a69852f..781592e9d5fb 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.11.Managed.LinqService).sql @@ -1,183 +1,13 @@ BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p AND ROWNUM <= 1 diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.11.Managed.LinqService).sql index de875a69852f..781592e9d5fb 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.11.Managed.LinqService).sql @@ -1,183 +1,13 @@ BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p AND ROWNUM <= 1 diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.11.Managed.LinqService).sql index de875a69852f..549ce4dd8f04 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.11.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.11.Managed.LinqService).sql index de875a69852f..4fc192bf2182 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.11.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MAX(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.11.Managed.LinqService).sql index de875a69852f..b08d56559501 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.11.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MIN(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.11.Managed.LinqService).sql index de875a69852f..d45e49b9c31b 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.11.Managed.LinqService).sql @@ -1,183 +1,13 @@ BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p AND ROWNUM <= 2 diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.11.Managed.LinqService).sql index de875a69852f..d45e49b9c31b 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.11.Managed.LinqService).sql @@ -1,183 +1,13 @@ BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p AND ROWNUM <= 2 diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..f2273acfbcf5 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" = 1 +UNION ALL +SELECT + p_1."ParentID", + p_1."Value1" +FROM + "Parent" p_1 +WHERE + p_1."ParentID" = 2 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.11.Managed.LinqService).sql index 4e351fc206e3..53f1dcf1dc35 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.11.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value Varchar2(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- Oracle.11.Managed Oracle11 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.11.Managed Oracle11 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.11.Managed Oracle11 @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.11.Managed Oracle11 @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.11.Managed Oracle11 @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.11.Managed Oracle11 diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.11.Managed.LinqService).sql index b1c91a3c65e6..db7a28b80c17 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.11.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value Varchar2(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- Oracle.11.Managed Oracle11 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" r +SET + "Stamp" = r."Stamp" + 1, + "Value" = :Value +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.11.Managed Oracle11 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" r +SET + "Stamp" = r."Stamp" + 1, + "Value" = :Value +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.11.Managed Oracle11 @@ -28,6 +84,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.11.Managed Oracle11 @@ -38,6 +106,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.11.Managed Oracle11 diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..36383be2cdc5 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" t1 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..24063f660923 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" > 2 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..711006e8d499 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" c_1 + LEFT JOIN "Parent" a_Parent ON c_1."ParentID" = a_Parent."ParentID" + WHERE + a_Parent."ParentID" = t1."ParentID" + )) +FROM + "Parent" t1 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.11.Managed.LinqService).sql index 2de4a65ff8e6..e1f1c84494de 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.11.Managed.LinqService).sql @@ -1,187 +1,11 @@ BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicParent" - ( - ID Int NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY (ID) - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -CREATE SEQUENCE "SIDENTITY_DynamicParent" - -BeforeExecute --- Oracle.11.Managed Oracle11 - -CREATE OR REPLACE TRIGGER "TIDENTITY_DynamicParent" -BEFORE INSERT ON "DynamicParent" FOR EACH ROW -BEGIN - SELECT "SIDENTITY_DynamicParent".NEXTVAL INTO :NEW.ID FROM dual; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicChild" - ( - ID Int NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY (ID) - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -CREATE SEQUENCE "SIDENTITY_DynamicChild" - -BeforeExecute --- Oracle.11.Managed Oracle11 - -CREATE OR REPLACE TRIGGER "TIDENTITY_DynamicChild" -BEFORE INSERT ON "DynamicChild" FOR EACH ROW -BEGIN - SELECT "SIDENTITY_DynamicChild".NEXTVAL INTO :NEW.ID FROM dual; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + it.ID +FROM + "DynamicParent" it + LEFT JOIN "DynamicChild" a_Child ON it.ID = a_Child."ParentID" +WHERE + a_Child.ID = 123 diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.11.Managed.LinqService).sql index d2b2ec8cdf1d..d4d54e3381c4 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.11.Managed.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 AND ROWNUM <= 1 + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 AND ROWNUM <= 1 + +BeforeExecute BeginTransactionAsync(ReadCommitted) BeforeExecute -- Oracle.11.Managed Oracle11 (asynchronously) diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.11.Managed.LinqService).sql index 2910bbee9d3d..8662a18e84b0 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.11.Managed.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 AND ROWNUM <= 1 + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 AND ROWNUM <= 1 + +BeforeExecute BeginTransaction BeforeExecute -- Oracle.11.Managed Oracle11 (asynchronously) diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..5c21b9d7114f --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" a_Children + INNER JOIN "GrandChild" a_GrandChildren ON a_Children."ParentID" = a_GrandChildren."ParentID" AND a_Children."ChildID" = a_GrandChildren."ChildID" + WHERE + p."ParentID" = a_Children."ParentID" + ) +FROM + "Parent" p + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..f7cefb81bfc0 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +WHERE + t1."Value1" = 1 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..93560bbccb22 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT DISTINCT + p1."PersonID", + p1."Gender", + p1."FirstName", + p1."LastName" +FROM + "Person" p1 +WHERE + p1."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + p1."Gender" = 'F' + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..c2e52ae2dbd6 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,7 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + 1 +FROM SYS.DUAL + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..b6f5741dedfb --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + x."MiddleName", + COUNT(*) +FROM + "Person" x +WHERE + x."MiddleName" IS NOT NULL +GROUP BY + x."MiddleName" +UNION ALL +SELECT + x_1."MiddleName", + COUNT(*) +FROM + "Person" x_1 +WHERE + x_1."MiddleName" IS NOT NULL +GROUP BY + x_1."MiddleName" +UNION ALL +SELECT + x_2."MiddleName", + COUNT(*) +FROM + "Person" x_2 +WHERE + x_2."MiddleName" IS NOT NULL +GROUP BY + x_2."MiddleName" +UNION ALL +SELECT + x_3."MiddleName", + COUNT(*) +FROM + "Person" x_3 +WHERE + x_3."MiddleName" IS NOT NULL +GROUP BY + x_3."MiddleName" +UNION ALL +SELECT + x_4."MiddleName", + COUNT(*) +FROM + "Person" x_4 +WHERE + x_4."MiddleName" IS NOT NULL +GROUP BY + x_4."MiddleName" +UNION ALL +SELECT + x_5."MiddleName", + COUNT(*) +FROM + "Person" x_5 +WHERE + x_5."MiddleName" IS NOT NULL +GROUP BY + x_5."MiddleName" +UNION ALL +SELECT + x_6."MiddleName", + COUNT(*) +FROM + "Person" x_6 +WHERE + x_6."MiddleName" IS NOT NULL +GROUP BY + x_6."MiddleName" +UNION ALL +SELECT + x_7."MiddleName", + COUNT(*) +FROM + "Person" x_7 +WHERE + x_7."MiddleName" IS NOT NULL +GROUP BY + x_7."MiddleName" +UNION ALL +SELECT + x_8."MiddleName", + COUNT(*) +FROM + "Person" x_8 +WHERE + x_8."MiddleName" IS NOT NULL +GROUP BY + x_8."MiddleName" +UNION ALL +SELECT + x_9."MiddleName", + COUNT(*) +FROM + "Person" x_9 +WHERE + x_9."MiddleName" IS NOT NULL +GROUP BY + x_9."MiddleName" +UNION ALL +SELECT + x_10."MiddleName", + COUNT(*) +FROM + "Person" x_10 +WHERE + x_10."MiddleName" IS NOT NULL +GROUP BY + x_10."MiddleName" +UNION ALL +SELECT + x_11."MiddleName", + COUNT(*) +FROM + "Person" x_11 +WHERE + x_11."MiddleName" IS NOT NULL +GROUP BY + x_11."MiddleName" +UNION ALL +SELECT + x_12."MiddleName", + COUNT(*) +FROM + "Person" x_12 +WHERE + x_12."MiddleName" IS NOT NULL +GROUP BY + x_12."MiddleName" +UNION ALL +SELECT + x_13."MiddleName", + COUNT(*) +FROM + "Person" x_13 +WHERE + x_13."MiddleName" IS NOT NULL +GROUP BY + x_13."MiddleName" +UNION ALL +SELECT + x_14."MiddleName", + COUNT(*) +FROM + "Person" x_14 +WHERE + x_14."MiddleName" IS NOT NULL +GROUP BY + x_14."MiddleName" +UNION ALL +SELECT + x_15."MiddleName", + COUNT(*) +FROM + "Person" x_15 +WHERE + x_15."MiddleName" IS NOT NULL +GROUP BY + x_15."MiddleName" +UNION ALL +SELECT + x_16."MiddleName", + COUNT(*) +FROM + "Person" x_16 +WHERE + x_16."MiddleName" IS NOT NULL +GROUP BY + x_16."MiddleName" +UNION ALL +SELECT + x_17."MiddleName", + COUNT(*) +FROM + "Person" x_17 +WHERE + x_17."MiddleName" IS NOT NULL +GROUP BY + x_17."MiddleName" +UNION ALL +SELECT + x_18."MiddleName", + COUNT(*) +FROM + "Person" x_18 +WHERE + x_18."MiddleName" IS NOT NULL +GROUP BY + x_18."MiddleName" +UNION ALL +SELECT + x_19."MiddleName", + COUNT(*) +FROM + "Person" x_19 +WHERE + x_19."MiddleName" IS NOT NULL +GROUP BY + x_19."MiddleName" +UNION ALL +SELECT + x_20."MiddleName", + COUNT(*) +FROM + "Person" x_20 +WHERE + x_20."MiddleName" IS NOT NULL +GROUP BY + x_20."MiddleName" + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.11.Managed.LinqService,False).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.11.Managed.LinqService,False).sql new file mode 100644 index 000000000000..d7d1cd0dc96c --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.11.Managed.LinqService,False).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + t2."ParentID", + t2."Value1" +FROM + ( + SELECT + t1."ParentID", + t1."Value1", + ROWNUM as RN + FROM + ( + SELECT + p."ParentID", + p."Value1" + FROM + "Parent" p + WHERE + p."ParentID" > 1 + ORDER BY + p."ParentID" + ) t1 + WHERE + ROWNUM <= (:n + 1) + ) t2 +WHERE + t2.RN > :n +ORDER BY + t2."ParentID" + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.11.Managed.LinqService,True).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.11.Managed.LinqService,True).sql new file mode 100644 index 000000000000..d7d1cd0dc96c --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.11.Managed.LinqService,True).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + t2."ParentID", + t2."Value1" +FROM + ( + SELECT + t1."ParentID", + t1."Value1", + ROWNUM as RN + FROM + ( + SELECT + p."ParentID", + p."Value1" + FROM + "Parent" p + WHERE + p."ParentID" > 1 + ORDER BY + p."ParentID" + ) t1 + WHERE + ROWNUM <= (:n + 1) + ) t2 +WHERE + t2.RN > :n +ORDER BY + t2."ParentID" + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.11.Managed.LinqService,False).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.11.Managed.LinqService,False).sql new file mode 100644 index 000000000000..d7d1cd0dc96c --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.11.Managed.LinqService,False).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + t2."ParentID", + t2."Value1" +FROM + ( + SELECT + t1."ParentID", + t1."Value1", + ROWNUM as RN + FROM + ( + SELECT + p."ParentID", + p."Value1" + FROM + "Parent" p + WHERE + p."ParentID" > 1 + ORDER BY + p."ParentID" + ) t1 + WHERE + ROWNUM <= (:n + 1) + ) t2 +WHERE + t2.RN > :n +ORDER BY + t2."ParentID" + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.11.Managed.LinqService,True).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.11.Managed.LinqService,True).sql new file mode 100644 index 000000000000..d7d1cd0dc96c --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.11.Managed.LinqService,True).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + t2."ParentID", + t2."Value1" +FROM + ( + SELECT + t1."ParentID", + t1."Value1", + ROWNUM as RN + FROM + ( + SELECT + p."ParentID", + p."Value1" + FROM + "Parent" p + WHERE + p."ParentID" > 1 + ORDER BY + p."ParentID" + ) t1 + WHERE + ROWNUM <= (:n + 1) + ) t2 +WHERE + t2.RN > :n +ORDER BY + t2."ParentID" + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.11.Managed.LinqService).sql index d1df40c2a006..0e6704a962e7 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.11.Managed.LinqService).sql @@ -1,97 +1,29 @@ BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "TakeSkipClass" - ( - "Value" VarChar(10) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.11.Managed Oracle11 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @skip Int32 +SET @skip = 1 +DECLARE @skip_1 Int32 +SET @skip_1 = 2 + +SELECT + t3."Value_1" +FROM + ( + SELECT + t2."Value_1", + ROWNUM as RN + FROM + ( + SELECT + t1."Value" as "Value_1" + FROM + "TakeSkipClass" t1 + ORDER BY + t1."Value" + ) t2 + ) t3 +WHERE + t3.RN > :skip + :skip_1 +ORDER BY + t3."Value_1" diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.11.Managed.LinqService,False).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.11.Managed.LinqService,False).sql index 3ed273e12e50..c0eb180b848c 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.11.Managed.LinqService,False).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.11.Managed.LinqService,False).sql @@ -20,3 +20,25 @@ FROM WHERE ROWNUM <= 3 +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ROWNUM <= 2 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ROWNUM <= 3 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.11.Managed.LinqService,True).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.11.Managed.LinqService,True).sql index 047b23bf7d8d..b9e1575c04aa 100644 --- a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.11.Managed.LinqService,True).sql +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.11.Managed.LinqService,True).sql @@ -24,3 +24,29 @@ FROM WHERE ROWNUM <= :take +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @take Int32 +SET @take = 2 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ROWNUM <= :take + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ROWNUM <= :take + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.11.Managed.LinqService,False).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.11.Managed.LinqService,False).sql new file mode 100644 index 000000000000..1a6adf53a0b7 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.11.Managed.LinqService,False).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +WHERE + ROWNUM <= :n + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.11.Managed.LinqService,True).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.11.Managed.LinqService,True).sql new file mode 100644 index 000000000000..1a6adf53a0b7 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.11.Managed.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +WHERE + ROWNUM <= :n + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.11.Managed.LinqService,False).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.11.Managed.LinqService,False).sql new file mode 100644 index 000000000000..4b1601fca3dd --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.11.Managed.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + (ch."ChildID" > 3 OR ch."ChildID" < 4) AND ROWNUM <= 3 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.11.Managed.LinqService,True).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.11.Managed.LinqService,True).sql new file mode 100644 index 000000000000..ec9863cb045b --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.11.Managed.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + (ch."ChildID" > 3 OR ch."ChildID" < 4) AND ROWNUM <= :take + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.11.Managed.LinqService,False).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.11.Managed.LinqService,False).sql new file mode 100644 index 000000000000..4b42ee12ecc3 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.11.Managed.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 AND ROWNUM <= 3 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.11.Managed.LinqService,True).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.11.Managed.LinqService,True).sql new file mode 100644 index 000000000000..5cd7657eb191 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.11.Managed.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 AND ROWNUM <= :take + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.11.Managed.LinqService,False).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.11.Managed.LinqService,False).sql new file mode 100644 index 000000000000..7bed4c2f4d2e --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.11.Managed.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +WHERE + ROWNUM <= 3 + diff --git a/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.11.Managed.LinqService,True).sql b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.11.Managed.LinqService,True).sql new file mode 100644 index 000000000000..c487cad5cc4e --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.11.Managed.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +WHERE + ROWNUM <= :take + diff --git a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,False,False).sql b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,False,False).sql index 79322c9bea35..90881092b008 100644 --- a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,False,False).sql +++ b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,False,False).sql @@ -10,3 +10,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,False,True).sql b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,False,True).sql index 54334e73c923..befcdf7391f3 100644 --- a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,False,True).sql +++ b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,False,True).sql @@ -20,3 +20,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE TABLE TEST."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,True,False).sql b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,True,False).sql index 79322c9bea35..90881092b008 100644 --- a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,True,False).sql +++ b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,True,False).sql @@ -10,3 +10,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,True,True).sql b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,True,True).sql index 54334e73c923..befcdf7391f3 100644 --- a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,True,True).sql +++ b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,False,True,True).sql @@ -20,3 +20,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE TABLE TEST."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,False,False).sql b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,False,False).sql index 60810692d00f..a07b44c09c1d 100644 --- a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,False,False).sql +++ b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,False,False).sql @@ -17,3 +17,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE TABLE "Issue681Table2"@XE +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,False,True).sql b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,False,True).sql index 3121bb8728b6..5d0d42a66cc3 100644 --- a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,False,True).sql +++ b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,False,True).sql @@ -27,3 +27,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE TABLE TEST."Issue681Table2"@XE +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,True,False).sql b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,True,False).sql index 60810692d00f..a07b44c09c1d 100644 --- a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,True,False).sql +++ b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,True,False).sql @@ -17,3 +17,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE TABLE "Issue681Table2"@XE +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,True,True).sql b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,True,True).sql index 3121bb8728b6..5d0d42a66cc3 100644 --- a/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,True,True).sql +++ b/Oracle.11.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.11.Managed.LinqService,True,True,True).sql @@ -27,3 +27,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE TABLE TEST."Issue681Table2"@XE +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..0e4d23bedbe2 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,77 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE TABLE "TestTable" +( + ID Int NOT NULL, + "Field1" VarChar(50) NULL, + "Field2" VarChar(255) NULL, + "CreatedOn" timestamp NULL, + + CONSTRAINT "PK_TestTable" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_TestTable" + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_TestTable" +BEFORE INSERT ON "TestTable" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_TestTable".NEXTVAL INTO :NEW.ID FROM dual; +END; + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1.ID, + t1."Field1", + t1."Field2", + t1."CreatedOn" +FROM + "TestTable" t1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_TestTable"'; + EXECUTE IMMEDIATE 'DROP TABLE "TestTable"'; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.11.Managed.LinqService).sql index cceb493afac6..2baed2ad94e2 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.11.Managed.LinqService).sql @@ -1,4 +1,45 @@ BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE ' + CREATE TABLE "TempTable" + ( + ID Int NOT NULL + ) + '; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -955 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +INSERT INTO "TempTable" +( + ID +) +SELECT + p."ParentID" +FROM + "Parent" p + +BeforeExecute -- Oracle.11.Managed Oracle11 SELECT @@ -7,3 +48,15 @@ FROM "Parent" p INNER JOIN "TempTable" t ON p."ParentID" = t.ID +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..63cd70cbae5a --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,133 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +WHERE + ROWNUM <= 2 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson_ol" t1 +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..05b9434f33bf --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..5331246106d8 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..5331246106d8 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.11.Managed.LinqService).sql index 9e37ba6d1e8d..b5ac26eb5c14 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.11.Managed.LinqService).sql @@ -1,5 +1,59 @@ BeforeExecute -- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) DECLARE @FirstName Varchar2(6) -- String SET @FirstName = 'Steven' DECLARE @LastName Varchar2(4) -- String @@ -58,3 +112,61 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" p +WHERE + p."FirstName" = 'Steven' AND p."LastName" = 'King' AND + p."Gender" = 'M' + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.11.Managed.LinqService).sql index 9c94dd6180c7..937064101066 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.11.Managed.LinqService).sql @@ -38,3 +38,100 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc0' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc1' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc2' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id AND ROWNUM <= 2 + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..59e1254db40e --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,163 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE TABLE "xxPatient" +( + "PersonID" Int NOT NULL, + "Diagnosis" VarChar(255) NULL, + + CONSTRAINT "PK_xxPatient" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.11.Managed.LinqService).sql index 9c94dd6180c7..40c5822cd4a9 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.11.Managed.LinqService).sql @@ -38,3 +38,100 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id AND ROWNUM <= 2 + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.11.Managed.LinqService).sql index 9c94dd6180c7..ea368a9368c5 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.11.Managed.LinqService).sql @@ -38,3 +38,106 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 0 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 1 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 2 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id AND ROWNUM <= 2 + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.11.Managed.LinqService).sql index acb33e67440b..ff563f0ed8a4 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.11.Managed.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' AND + ROWNUM <= 2 + BeforeExecute -- Oracle.11.Managed Oracle11 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.11.Managed.LinqService).sql index acb33e67440b..ff563f0ed8a4 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.11.Managed.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' AND + ROWNUM <= 2 + BeforeExecute -- Oracle.11.Managed Oracle11 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.11.Managed.LinqService).sql index fce7d2d65da1..4b9adc663402 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.11.Managed.LinqService).sql @@ -36,6 +36,23 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Varchar2(5) -- String +SET @p = 'John0' + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' AND + ROWNUM <= 2 + BeforeExecute -- Oracle.11.Managed Oracle11 (asynchronously) DECLARE @FirstName Varchar2(5) -- String @@ -66,6 +83,23 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Varchar2(5) -- String +SET @p = 'John1' + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' AND + ROWNUM <= 2 + BeforeExecute -- Oracle.11.Managed Oracle11 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.11.Managed.LinqService).sql index 1167679cf07b..d5bd63e8d998 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.11.Managed.LinqService).sql @@ -218,6 +218,39 @@ VALUES :Field4 ) +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +MERGE INTO "TestMerge1" Target +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 + WHERE + t1."Id" = 5 +) "Source" +ON (Target."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Oracle.11.Managed Oracle11 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.11.Managed.LinqService).sql index 1167679cf07b..46d383ddae6d 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.11.Managed.LinqService).sql @@ -218,6 +218,37 @@ VALUES :Field4 ) +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +MERGE INTO "TestMerge1" Target +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 +) "Source" +ON (Target."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Oracle.11.Managed Oracle11 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.11.Managed.LinqService).sql index dd6e2182d794..3d4a8ee1f542 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.11.Managed.LinqService).sql @@ -1,43 +1,98 @@ BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_N" < 0 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + 3002, + "source_N" + ) +SELECT + 42 as "source_N", + 3000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" t1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 3002 BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.11.Managed Oracle11 (asynchronously) + +INSERT ALL +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + 4002, + "source_N" + ) +SELECT + 4000 as "source_ID", + 42 as "source_N" +FROM SYS.DUAL + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" t1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 4001 OR x.ID = 4002 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.11.Managed.LinqService).sql index 70f0d633f82b..d8cc72ac3fd8 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.11.Managed.LinqService).sql @@ -1,85 +1,70 @@ BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" < 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) +WHEN 1 = 1 THEN + INTO "Dest2" + ( + ID, + "Int" + ) + VALUES + ( + "source_ID" + 3, + "source_ID" + 1 + ) +SELECT + 42 as "source_N", + 1000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 1001 BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest2" - ( - ID Int NOT NULL, - "Int" Int NOT NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest2" x +WHERE + x.ID = 1003 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.11.Managed.LinqService).sql index 70f0d633f82b..b6bcd2962167 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.11.Managed.LinqService).sql @@ -1,85 +1,65 @@ BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) + INTO "Dest2" + ( + ID, + "Int" + ) + VALUES + ( + "source_ID" + 3, + "source_ID" + 1 + ) +SELECT + 1000 as "source_ID", + 42 as "source_N" +FROM SYS.DUAL BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest2" - ( - ID Int NOT NULL, - "Int" Int NOT NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest2" x +WHERE + x.ID = 1003 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.11.Managed.LinqService).sql index dd6e2182d794..54ec6cefc483 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.11.Managed.LinqService).sql @@ -1,43 +1,60 @@ BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT FIRST +WHEN "source_N" < 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) +ELSE + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 3, + "source_N" + ) +SELECT + 42 as "source_N", + 1000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 1003 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.11.Managed.LinqService,null).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.11.Managed.LinqService,null).sql index dd6e2182d794..127ee5629e59 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.11.Managed.LinqService,null).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.11.Managed.LinqService,null).sql @@ -1,43 +1,48 @@ BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2 -- String +SET @value = NULL -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 AND ROWNUM <= 2 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.11.Managed.LinqService,one).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.11.Managed.LinqService,one).sql index dd6e2182d794..ad081ec1c92c 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.11.Managed.LinqService,one).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.11.Managed.LinqService,one).sql @@ -1,43 +1,48 @@ BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 AND ROWNUM <= 2 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.11.Managed.LinqService,two).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.11.Managed.LinqService,two).sql index dd6e2182d794..fe4c46928ef2 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.11.Managed.LinqService,two).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.11.Managed.LinqService,two).sql @@ -1,43 +1,48 @@ BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 AND ROWNUM <= 2 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.11.Managed.LinqService,null).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.11.Managed.LinqService,null).sql index dd6e2182d794..f2f911856b5f 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.11.Managed.LinqService,null).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.11.Managed.LinqService,null).sql @@ -1,43 +1,48 @@ BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2 -- String +SET @value = NULL +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 AND ROWNUM <= 2 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.11.Managed.LinqService,one).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.11.Managed.LinqService,one).sql index dd6e2182d794..51f8a562ccf1 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.11.Managed.LinqService,one).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.11.Managed.LinqService,one).sql @@ -1,43 +1,48 @@ BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 AND ROWNUM <= 2 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.11.Managed.LinqService,two).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.11.Managed.LinqService,two).sql index dd6e2182d794..84777c289913 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.11.Managed.LinqService,two).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.11.Managed.LinqService,two).sql @@ -1,43 +1,48 @@ BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 AND ROWNUM <= 2 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.11.Managed.LinqService,null).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.11.Managed.LinqService,null).sql index dd6e2182d794..38c0dc7c2719 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.11.Managed.LinqService,null).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.11.Managed.LinqService,null).sql @@ -1,43 +1,48 @@ BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2 -- String +SET @value = NULL -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 AND ROWNUM <= 2 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.11.Managed.LinqService,one).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.11.Managed.LinqService,one).sql index dd6e2182d794..e71f9aad32ac 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.11.Managed.LinqService,one).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.11.Managed.LinqService,one).sql @@ -1,43 +1,48 @@ BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 AND ROWNUM <= 2 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.11.Managed.LinqService,two).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.11.Managed.LinqService,two).sql index dd6e2182d794..6af8570c92cb 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.11.Managed.LinqService,two).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.11.Managed.LinqService,two).sql @@ -1,43 +1,48 @@ BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.11.Managed Oracle11 +-- Oracle.11.Managed Oracle11 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.11.Managed Oracle11 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 AND ROWNUM <= 2 diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..00a98c0c287e --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = ( + SELECT + p2_1."ParentID" + FROM + "Parent" p1_1 + INNER JOIN "Parent" p2_1 ON p1_1."ParentID" = p2_1."ParentID" + WHERE + p1_1."ParentID" < 3 AND "Parent"."ParentID" = p1_1."ParentID" AND + ("Parent"."Value1" = p1_1."Value1" OR "Parent"."Value1" IS NULL AND p1_1."Value1" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "Parent" p1 + INNER JOIN "Parent" p2 ON p1."ParentID" = p2."ParentID" + WHERE + p1."ParentID" < 3 AND "Parent"."ParentID" = p1."ParentID" AND + ("Parent"."Value1" = p1."Value1" OR "Parent"."Value1" IS NULL AND p1."Value1" IS NULL) + ) + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..15ca413ccf0d --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" p +SET + "ParentID" = p."ParentID" + 1 +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..15ca413ccf0d --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" p +SET + "ParentID" = p."ParentID" + 1 +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..2c40324e8a1b --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +WHERE + EXISTS( + SELECT + * + FROM + "Child" c_1 + LEFT JOIN "Parent" a_Parent ON c_1."ParentID" = a_Parent."ParentID" + WHERE + c_1."ChildID" = :id AND + a_Parent."Value1" = 1 AND + "Child"."ParentID" = c_1."ParentID" AND + "Child"."ChildID" = c_1."ChildID" + ) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :p + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..21dfb36fbb01 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" child_1 + LEFT JOIN "Parent" a_Parent ON child_1."ParentID" = a_Parent."ParentID" + WHERE + child_1."ChildID" = 10000 AND "Parent"."ParentID" = a_Parent."ParentID" AND + ("Parent"."Value1" = a_Parent."Value1" OR "Parent"."Value1" IS NULL AND a_Parent."Value1" IS NULL) + ) + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..21dfb36fbb01 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" child_1 + LEFT JOIN "Parent" a_Parent ON child_1."ParentID" = a_Parent."ParentID" + WHERE + child_1."ChildID" = 10000 AND "Parent"."ParentID" = a_Parent."ParentID" AND + ("Parent"."Value1" = a_Parent."Value1" OR "Parent"."Value1" IS NULL AND a_Parent."Value1" IS NULL) + ) + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.11.Managed.LinqService).sql new file mode 100644 index 000000000000..e37c19540c75 --- /dev/null +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.11.Managed.LinqService).sql @@ -0,0 +1,152 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +WHERE + ROWNUM <= 2 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Int32 +SET @ID = 1 + +UPDATE + "xxPerson_ol" t1 +SET + "FirstName" = :FirstName, + "LastName" = :LastName, + "MiddleName" = :MiddleName, + "Gender" = :Gender +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +WHERE + ROWNUM <= 2 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + diff --git a/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.11.Managed.LinqService).sql b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.11.Managed.LinqService).sql index ca99944bf364..80e7b046b911 100644 --- a/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.11.Managed.LinqService).sql +++ b/Oracle.11.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.11.Managed.LinqService).sql @@ -38,3 +38,58 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + t1."PersonID", + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id AND ROWNUM <= 1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @Gender Varchar2(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName Varchar2(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName Varchar2 -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName Varchar2(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int32 +SET @ID = 5 + +UPDATE + "Person" t1 +SET + "Gender" = :Gender, + "FirstName" = :Name_FirstName, + "MiddleName" = :Name_MiddleName, + "LastName" = :Name_LastName +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + t1."PersonID", + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id AND ROWNUM <= 1 + diff --git a/Oracle.11.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.11.Managed).sql b/Oracle.11.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.11.Managed).sql new file mode 100644 index 000000000000..1322ebe18a25 --- /dev/null +++ b/Oracle.11.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.11.Managed).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.11.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.11.Managed).sql b/Oracle.11.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.11.Managed).sql new file mode 100644 index 000000000000..63f6faf4c674 --- /dev/null +++ b/Oracle.11.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.11.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.11.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.11.Managed).sql b/Oracle.11.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.11.Managed).sql new file mode 100644 index 000000000000..63f6faf4c674 --- /dev/null +++ b/Oracle.11.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.11.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.11.Managed Oracle11 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + From 310bc91f7f3893de5bd0b9aa46da1b9e0da512f8 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 21:04:38 +0000 Subject: [PATCH 20/40] [Linux / PostgreSQL 14] baselines --- ...s.All4Async(PostgreSQL.14.LinqService).sql | 13 + ...oupBy2Async(PostgreSQL.14.LinqService).sql | 30 ++ ...erable1Test(PostgreSQL.14.LinqService).sql | 9 + ...erable2Test(PostgreSQL.14.LinqService).sql | 11 + ...leCast1Test(PostgreSQL.14.LinqService).sql | 9 + ...leCast2Test(PostgreSQL.14.LinqService).sql | 11 + ...nsAsyncTest(PostgreSQL.14.LinqService).sql | 17 + ...stAsyncTest(PostgreSQL.14.LinqService).sql | 15 + ...akeSkipTest(PostgreSQL.14.LinqService).sql | 16 + ...stOrDefault(PostgreSQL.14.LinqService).sql | 20 + ...upAsyncTest(PostgreSQL.14.LinqService).sql | 21 + ...ntAsyncTest(PostgreSQL.14.LinqService).sql | 21 + ...nyTestAsync(PostgreSQL.14.LinqService).sql | 30 ++ ...yTestAsync2(PostgreSQL.14.LinqService).sql | 30 ++ ...oAsyncdTest(PostgreSQL.14.LinqService).sql | 16 + ...dTest3Async(PostgreSQL.14.LinqService).sql | 28 ++ ...nsTestAsync(PostgreSQL.14.LinqService).sql | 34 ++ ...ntTestAsync(PostgreSQL.14.LinqService).sql | 24 + ...tTestAsync2(PostgreSQL.14.LinqService).sql | 24 + ...tTestAsync1(PostgreSQL.14.LinqService).sql | 28 ++ ...tTestAsync2(PostgreSQL.14.LinqService).sql | 28 ++ ...axTestAsync(PostgreSQL.14.LinqService).sql | 24 + ...xTestAsync2(PostgreSQL.14.LinqService).sql | 24 + ...dicateAsync(PostgreSQL.14.LinqService).sql | 171 +------ ...dicateAsync(PostgreSQL.14.LinqService).sql | 168 +------ ...dicateAsync(PostgreSQL.14.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.14.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.14.LinqService).sql | 168 +------ ...lectorAsync(PostgreSQL.14.LinqService).sql | 168 +------ ...lectorAsync(PostgreSQL.14.LinqService).sql | 168 +------ ...dicateAsync(PostgreSQL.14.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.14.LinqService).sql | 170 +------ ...oncat1Async(PostgreSQL.14.LinqService).sql | 19 + ...rementAsync(PostgreSQL.14.LinqService).sql | 97 ++++ ...lteredAsync(PostgreSQL.14.LinqService).sql | 82 ++++ ...Count1Async(PostgreSQL.14.LinqService).sql | 8 + ...Count2Async(PostgreSQL.14.LinqService).sql | 10 + ...ryMax1Async(PostgreSQL.14.LinqService).sql | 16 + ...s.Issue4602(PostgreSQL.14.LinqService).sql | 48 +- ...e4057_Async(PostgreSQL.14.LinqService).sql | 31 ++ ...Transaction(PostgreSQL.14.LinqService).sql | 31 ++ ...essionAsync(PostgreSQL.14.LinqService).sql | 25 + ....Cast1Async(PostgreSQL.14.LinqService).sql | 11 + ...Test18Async(PostgreSQL.14.LinqService).sql | 14 + ...meter1Async(PostgreSQL.14.LinqService).sql | 6 + ...sue3132Test(PostgreSQL.14.LinqService).sql | 213 +++++++++ ...Async(PostgreSQL.14.LinqService,False).sql | 16 + ...2Async(PostgreSQL.14.LinqService,True).sql | 16 + ...Async(PostgreSQL.14.LinqService,False).sql | 16 + ...3Async(PostgreSQL.14.LinqService,True).sql | 16 + ...eSkip1Async(PostgreSQL.14.LinqService).sql | 83 +--- ...Async(PostgreSQL.14.LinqService,False).sql | 20 + ...1Async(PostgreSQL.14.LinqService,True).sql | 24 + ...Async(PostgreSQL.14.LinqService,False).sql | 12 + ...2Async(PostgreSQL.14.LinqService,True).sql | 12 + ...Async(PostgreSQL.14.LinqService,False).sql | 12 + ...3Async(PostgreSQL.14.LinqService,True).sql | 14 + ...Async(PostgreSQL.14.LinqService,False).sql | 12 + ...4Async(PostgreSQL.14.LinqService,True).sql | 14 + ...Async(PostgreSQL.14.LinqService,False).sql | 10 + ...5Async(PostgreSQL.14.LinqService,True).sql | 12 + ...eSQL.14.LinqService,False,False,False).sql | 16 + ...reSQL.14.LinqService,False,False,True).sql | 16 + ...reSQL.14.LinqService,False,True,False).sql | 16 + ...greSQL.14.LinqService,False,True,True).sql | 16 + ...reSQL.14.LinqService,True,False,False).sql | 16 + ...greSQL.14.LinqService,True,False,True).sql | 16 + ...greSQL.14.LinqService,True,True,False).sql | 16 + ...tgreSQL.14.LinqService,True,True,True).sql | 16 + ...Table1Async(PostgreSQL.14.LinqService).sql | 34 ++ ...eTableAsync(PostgreSQL.14.LinqService).sql | 30 ++ ...leNameAsync(PostgreSQL.14.LinqService).sql | 89 ++++ ...yncTest(PostgreSQL.14.LinqService,100).sql | 17 + ...yncTest(PostgreSQL.14.LinqService,200).sql | 17 + ...eRecord(PostgreSQL.14.LinqService,100).sql | 12 + ...eRecord(PostgreSQL.14.LinqService,200).sql | 12 + ...yncTest(PostgreSQL.14.LinqService,100).sql | 14 + ...yncTest(PostgreSQL.14.LinqService,200).sql | 14 + ...eRecord(PostgreSQL.14.LinqService,100).sql | 14 + ...eRecord(PostgreSQL.14.LinqService,200).sql | 14 + ...yncTest(PostgreSQL.14.LinqService,100).sql | 11 + ...yncTest(PostgreSQL.14.LinqService,200).sql | 11 + ...eRecord(PostgreSQL.14.LinqService,100).sql | 11 + ...eRecord(PostgreSQL.14.LinqService,200).sql | 11 + ...nsert2Async(PostgreSQL.14.LinqService).sql | 44 ++ ...nsert3Async(PostgreSQL.14.LinqService).sql | 46 ++ ...nsert4Async(PostgreSQL.14.LinqService).sql | 46 ++ ...leNameAsync(PostgreSQL.14.LinqService).sql | 69 +++ ...place1Async(PostgreSQL.14.LinqService).sql | 74 +++ ...leNameAsync(PostgreSQL.14.LinqService).sql | 117 +++++ ...pdate3Async(PostgreSQL.14.LinqService).sql | 74 +++ ...date3xAsync(PostgreSQL.14.LinqService).sql | 74 +++ ...ntity1Async(PostgreSQL.14.LinqService).sql | 15 + ...ntity2Async(PostgreSQL.14.LinqService).sql | 15 + ...ntity4Async(PostgreSQL.14.LinqService).sql | 34 ++ ...AsyncTest(PostgreSQL.14.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.14.LinqService,2).sql | 36 +- ...AsyncTest(PostgreSQL.14.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.14.LinqService,2).sql | 36 +- ...stAsync(PostgreSQL.14.LinqService,100).sql | 24 + ...stAsync(PostgreSQL.14.LinqService,200).sql | 24 + ...eRecord(PostgreSQL.14.LinqService,100).sql | 24 + ...eRecord(PostgreSQL.14.LinqService,200).sql | 24 + ...AsyncTest(PostgreSQL.14.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.14.LinqService,2).sql | 36 +- ...AsyncTest(PostgreSQL.14.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.14.LinqService,2).sql | 36 +- ...date12Async(PostgreSQL.14.LinqService).sql | 12 + ...pdate1Async(PostgreSQL.14.LinqService).sql | 54 +++ ...pdate2Async(PostgreSQL.14.LinqService).sql | 54 +++ ...pdate4Async(PostgreSQL.14.LinqService).sql | 55 +++ ...ation1Async(PostgreSQL.14.LinqService).sql | 40 ++ ...on1AsyncOld(PostgreSQL.14.LinqService).sql | 40 ++ ...leNameAsync(PostgreSQL.14.LinqService).sql | 107 +++++ ...mplex1Async(PostgreSQL.14.LinqService).sql | 57 +++ ...cWithoutOld(PostgreSQL.14.LinqService).sql | 449 +----------------- ...rnateUpdate(PostgreSQL.14.LinqService).sql | 448 +---------------- ...ingleRecord(PostgreSQL.14.LinqService).sql | 448 +---------------- ...cWithoutOld(PostgreSQL.14.LinqService).sql | 449 +----------------- ...rnateUpdate(PostgreSQL.14.LinqService).sql | 448 +---------------- ...ingleRecord(PostgreSQL.14.LinqService).sql | 448 +---------------- ...cWithoutOld(PostgreSQL.14.LinqService).sql | 227 +-------- ...ingleRecord(PostgreSQL.14.LinqService).sql | 227 +-------- ...cWithoutOld(PostgreSQL.14.LinqService).sql | 228 +-------- ...ingleRecord(PostgreSQL.14.LinqService).sql | 228 +-------- ...ts.Linq.AsyncTests.Test(PostgreSQL.14).sql | 18 + ...s.Linq.AsyncTests.Test1(PostgreSQL.14).sql | 9 + ....AsyncTests.TestForEach(PostgreSQL.14).sql | 9 + 128 files changed, 3271 insertions(+), 5121 deletions(-) create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.14.LinqService,False).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.14.LinqService,True).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.14.LinqService,False).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.14.LinqService,True).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.14.LinqService,False).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.14.LinqService,True).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.14.LinqService,False).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.14.LinqService,True).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.14.LinqService,False).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.14.LinqService,True).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.14.LinqService,False).sql create mode 100644 PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.14.LinqService,True).sql create mode 100644 PostgreSQL.14.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.14.LinqService).sql create mode 100644 PostgreSQL.14/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.14).sql create mode 100644 PostgreSQL.14/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.14).sql create mode 100644 PostgreSQL.14/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.14).sql diff --git a/PostgreSQL.14.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..ecb6578c0202 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" <= 3 + ) + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..ff4ae2879d20 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT DISTINCT + "a_Parent1"."ParentID" + FROM + "Child" t1 + INNER JOIN "Parent" "a_Parent1" ON t1."ParentID" = "a_Parent1"."ParentID" + ) m_1 + INNER JOIN "Child" d + INNER JOIN "Parent" "a_Parent1_1" ON d."ParentID" = "a_Parent1_1"."ParentID" + ON m_1."ParentID" = "a_Parent1_1"."ParentID" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + "a_Parent1"."ParentID" +FROM + "Child" t1 + INNER JOIN "Parent" "a_Parent1" ON t1."ParentID" = "a_Parent1"."ParentID" +GROUP BY + "a_Parent1"."ParentID" + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..d029bd40d534 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.14.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..8d050a381c20 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.14.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..d029bd40d534 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.14.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..8d050a381c20 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.14.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..77a1b6f94712 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.14.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN :ID IN ( + SELECT + t1."PersonID" + FROM + "Person" t1 + ) + THEN True + ELSE False + END + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..90d0b0ce2f6d --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.14.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."PersonID" = 1 +LIMIT 1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.14.LinqService).sql index 0eb4cba82272..9e9047c4381a 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.14.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY t1."ParentID" LIMIT :take OFFSET :skip +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 +DECLARE @skip Integer -- Int32 +SET @skip = 1 + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +ORDER BY + t1."ParentID" +LIMIT :take OFFSET :skip + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..31c877481e54 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.14.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer -- Int32 +SET @p_2 = 3 +DECLARE @param Integer -- Int32 +SET @param = 4 + +SELECT + o."ParentID", + o."Value1" +FROM + "Parent" o +WHERE + o."ParentID" IN (:p, :p_1, :p_2) OR o."ParentID" = :param +LIMIT 1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..1b54e82fdfcf --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.14.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..1b54e82fdfcf --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.14.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..a5ebfa25698a --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.14.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..a5ebfa25698a --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.14.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..d19fceaf2c86 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.14.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = :p +ORDER BY + x."ParentID" DESC +LIMIT 1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..2660c54dfd16 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT :p + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT :p + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..1d4b05d46d39 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.14.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN True + ELSE False + END + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN True + ELSE False + END + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..f24aa6096209 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.14.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..f24aa6096209 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.14.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..758add9b6d39 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.14.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..758add9b6d39 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.14.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..fc25e8566c48 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.14.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..fc25e8566c48 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.14.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.14.LinqService).sql index 2e01285d1303..44ce57a121da 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.14.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + "AsyncDataTable" c_1 + WHERE + c_1."Id" = :p + ) diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.14.LinqService).sql index 2e01285d1303..17c94443d494 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.14.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.14.LinqService).sql index 2e01285d1303..ef00a9e2a714 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.14.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 1 diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.14.LinqService).sql index 2e01285d1303..ef00a9e2a714 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.14.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 1 diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.14.LinqService).sql index 2e01285d1303..17c94443d494 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.14.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.14.LinqService).sql index 2e01285d1303..3ceab0ae74a6 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.14.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MAX(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.14.LinqService).sql index 2e01285d1303..48aeaa55fea9 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.14.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MIN(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.14.LinqService).sql index 2e01285d1303..d84b7a14ba45 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.14.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 2 diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.14.LinqService).sql index 2e01285d1303..d84b7a14ba45 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.14.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 2 diff --git a/PostgreSQL.14.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..6290fc37bb3a --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" = 1 +UNION ALL +SELECT + p_1."ParentID", + p_1."Value1" +FROM + "Parent" p_1 +WHERE + p_1."ParentID" = 2 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.14.LinqService).sql index f3b1b7e6a454..5ac5ff703ba0 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.14.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value Text(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL diff --git a/PostgreSQL.14.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.14.LinqService).sql index 7da898bd9b57..605dcf6301a1 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.14.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value Text(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL SELECT @@ -8,6 +30,24 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" +SET + "Stamp" = "ConcurrencyFiltered"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyFiltered"."Id" = 2 AND "ConcurrencyFiltered"."Id" = :Id AND + "ConcurrencyFiltered"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL @@ -18,6 +58,24 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" +SET + "Stamp" = "ConcurrencyFiltered"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyFiltered"."Id" = 1 AND "ConcurrencyFiltered"."Id" = :Id AND + "ConcurrencyFiltered"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL @@ -28,6 +86,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL @@ -38,6 +108,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..66544a30533f --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" t1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..b7e2fcdc11c3 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" > 2 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..0d2c04ce42a9 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" c_1 + LEFT JOIN "Parent" "a_Parent" ON c_1."ParentID" = "a_Parent"."ParentID" + WHERE + "a_Parent"."ParentID" = t1."ParentID" + )) +FROM + "Parent" t1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.14.LinqService).sql index b088d55af8d7..d7c4391789a2 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.14.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DynamicParent" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DynamicParent" -( - "ID" SERIAL NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY ("ID") -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DynamicChild" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DynamicChild" -( - "ID" SERIAL NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY ("ID") -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DynamicChild" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DynamicParent" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + it."ID" +FROM + "DynamicParent" it + LEFT JOIN "DynamicChild" "a_Child" ON it."ID" = "a_Child"."ParentID" +WHERE + "a_Child"."ID" = 123 diff --git a/PostgreSQL.14.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.14.LinqService).sql index 67611b8dc5b4..5535282d422e 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.14.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + LIMIT 1 + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) diff --git a/PostgreSQL.14.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.14.LinqService).sql index 28cb113854fd..4d06d794f494 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.14.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + LIMIT 1 + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) diff --git a/PostgreSQL.14.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..357714afefc0 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.14.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" "a_Children" + INNER JOIN "GrandChild" "a_GrandChildren" ON "a_Children"."ParentID" = "a_GrandChildren"."ParentID" AND "a_Children"."ChildID" = "a_GrandChildren"."ChildID" + WHERE + p."ParentID" = "a_Children"."ParentID" + ) +FROM + "Parent" p + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..478e9c07b05e --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +WHERE + t1."Value1" = 1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..14c4d63c83f9 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT DISTINCT + p1."PersonID", + p1."Gender", + p1."FirstName", + p1."LastName" +FROM + "Person" p1 +WHERE + p1."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + p1."Gender" = 'F' + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..1dd3bbf41bde --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + 1 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..7317be379a3f --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.14.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + x."MiddleName", + COUNT(*) +FROM + "Person" x +WHERE + x."MiddleName" IS NOT NULL +GROUP BY + x."MiddleName" +UNION ALL +SELECT + x_1."MiddleName", + COUNT(*) +FROM + "Person" x_1 +WHERE + x_1."MiddleName" IS NOT NULL +GROUP BY + x_1."MiddleName" +UNION ALL +SELECT + x_2."MiddleName", + COUNT(*) +FROM + "Person" x_2 +WHERE + x_2."MiddleName" IS NOT NULL +GROUP BY + x_2."MiddleName" +UNION ALL +SELECT + x_3."MiddleName", + COUNT(*) +FROM + "Person" x_3 +WHERE + x_3."MiddleName" IS NOT NULL +GROUP BY + x_3."MiddleName" +UNION ALL +SELECT + x_4."MiddleName", + COUNT(*) +FROM + "Person" x_4 +WHERE + x_4."MiddleName" IS NOT NULL +GROUP BY + x_4."MiddleName" +UNION ALL +SELECT + x_5."MiddleName", + COUNT(*) +FROM + "Person" x_5 +WHERE + x_5."MiddleName" IS NOT NULL +GROUP BY + x_5."MiddleName" +UNION ALL +SELECT + x_6."MiddleName", + COUNT(*) +FROM + "Person" x_6 +WHERE + x_6."MiddleName" IS NOT NULL +GROUP BY + x_6."MiddleName" +UNION ALL +SELECT + x_7."MiddleName", + COUNT(*) +FROM + "Person" x_7 +WHERE + x_7."MiddleName" IS NOT NULL +GROUP BY + x_7."MiddleName" +UNION ALL +SELECT + x_8."MiddleName", + COUNT(*) +FROM + "Person" x_8 +WHERE + x_8."MiddleName" IS NOT NULL +GROUP BY + x_8."MiddleName" +UNION ALL +SELECT + x_9."MiddleName", + COUNT(*) +FROM + "Person" x_9 +WHERE + x_9."MiddleName" IS NOT NULL +GROUP BY + x_9."MiddleName" +UNION ALL +SELECT + x_10."MiddleName", + COUNT(*) +FROM + "Person" x_10 +WHERE + x_10."MiddleName" IS NOT NULL +GROUP BY + x_10."MiddleName" +UNION ALL +SELECT + x_11."MiddleName", + COUNT(*) +FROM + "Person" x_11 +WHERE + x_11."MiddleName" IS NOT NULL +GROUP BY + x_11."MiddleName" +UNION ALL +SELECT + x_12."MiddleName", + COUNT(*) +FROM + "Person" x_12 +WHERE + x_12."MiddleName" IS NOT NULL +GROUP BY + x_12."MiddleName" +UNION ALL +SELECT + x_13."MiddleName", + COUNT(*) +FROM + "Person" x_13 +WHERE + x_13."MiddleName" IS NOT NULL +GROUP BY + x_13."MiddleName" +UNION ALL +SELECT + x_14."MiddleName", + COUNT(*) +FROM + "Person" x_14 +WHERE + x_14."MiddleName" IS NOT NULL +GROUP BY + x_14."MiddleName" +UNION ALL +SELECT + x_15."MiddleName", + COUNT(*) +FROM + "Person" x_15 +WHERE + x_15."MiddleName" IS NOT NULL +GROUP BY + x_15."MiddleName" +UNION ALL +SELECT + x_16."MiddleName", + COUNT(*) +FROM + "Person" x_16 +WHERE + x_16."MiddleName" IS NOT NULL +GROUP BY + x_16."MiddleName" +UNION ALL +SELECT + x_17."MiddleName", + COUNT(*) +FROM + "Person" x_17 +WHERE + x_17."MiddleName" IS NOT NULL +GROUP BY + x_17."MiddleName" +UNION ALL +SELECT + x_18."MiddleName", + COUNT(*) +FROM + "Person" x_18 +WHERE + x_18."MiddleName" IS NOT NULL +GROUP BY + x_18."MiddleName" +UNION ALL +SELECT + x_19."MiddleName", + COUNT(*) +FROM + "Person" x_19 +WHERE + x_19."MiddleName" IS NOT NULL +GROUP BY + x_19."MiddleName" +UNION ALL +SELECT + x_20."MiddleName", + COUNT(*) +FROM + "Person" x_20 +WHERE + x_20."MiddleName" IS NOT NULL +GROUP BY + x_20."MiddleName" + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.14.LinqService,False).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.14.LinqService,False).sql new file mode 100644 index 000000000000..50e237b89d76 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.14.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.14.LinqService,True).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.14.LinqService,True).sql new file mode 100644 index 000000000000..50e237b89d76 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.14.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.14.LinqService,False).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.14.LinqService,False).sql new file mode 100644 index 000000000000..50e237b89d76 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.14.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.14.LinqService,True).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.14.LinqService,True).sql new file mode 100644 index 000000000000..50e237b89d76 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.14.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.14.LinqService).sql index a8e1551bbbd2..a7b42670fe1b 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.14.LinqService).sql @@ -1,74 +1,13 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TakeSkipClass" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TakeSkipClass" -( - "Value" VarChar(10) NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TakeSkipClass" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @skip Integer -- Int32 +SET @skip = 3 + +SELECT + t1."Value" +FROM + "TakeSkipClass" t1 +ORDER BY + t1."Value" +OFFSET :skip diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.14.LinqService,False).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.14.LinqService,False).sql index 73f25ef95117..a60ad20eb5ed 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.14.LinqService,False).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.14.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" ch LIMIT 3 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT 2 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT 3 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.14.LinqService,True).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.14.LinqService,True).sql index 02d4569cd21f..a476515dab8b 100644 --- a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.14.LinqService,True).sql +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.14.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" ch LIMIT :take +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT :take + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT :take + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.14.LinqService,False).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.14.LinqService,False).sql new file mode 100644 index 000000000000..1b7fa9ead245 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.14.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :n + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.14.LinqService,True).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.14.LinqService,True).sql new file mode 100644 index 000000000000..1b7fa9ead245 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.14.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :n + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.14.LinqService,False).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.14.LinqService,False).sql new file mode 100644 index 000000000000..6c3e4b95f227 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.14.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +LIMIT 3 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.14.LinqService,True).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.14.LinqService,True).sql new file mode 100644 index 000000000000..cfe179b009ac --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.14.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +LIMIT :take + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.14.LinqService,False).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.14.LinqService,False).sql new file mode 100644 index 000000000000..fc103eb790ef --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.14.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +LIMIT 3 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.14.LinqService,True).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.14.LinqService,True).sql new file mode 100644 index 000000000000..03cb9cc96f80 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.14.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +LIMIT :take + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.14.LinqService,False).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.14.LinqService,False).sql new file mode 100644 index 000000000000..3683b2861bac --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.14.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT 3 + diff --git a/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.14.LinqService,True).sql b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.14.LinqService,True).sql new file mode 100644 index 000000000000..3e54cd733fd4 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.14.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :take + diff --git a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,False,False).sql b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,False,False).sql index 591c7a26378c..6b2e9c5f2193 100644 --- a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,False,False).sql +++ b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,False,True).sql b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,False,True).sql index 3967fa2f79ae..0be718948cb3 100644 --- a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,False,True).sql +++ b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,False,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,True,False).sql b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,True,False).sql index f8efe7def81b..1f31bb93ecfa 100644 --- a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,True,False).sql +++ b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,True,True).sql b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,True,True).sql index e62d3ce33082..3de0bef88338 100644 --- a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,True,True).sql +++ b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,False,True,True).sql @@ -21,3 +21,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE testdata.public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,False,False).sql b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,False,False).sql index 591c7a26378c..6b2e9c5f2193 100644 --- a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,False,False).sql +++ b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,False,True).sql b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,False,True).sql index 3967fa2f79ae..0be718948cb3 100644 --- a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,False,True).sql +++ b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,False,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,True,False).sql b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,True,False).sql index f8efe7def81b..1f31bb93ecfa 100644 --- a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,True,False).sql +++ b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,True,True).sql b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,True,True).sql index e62d3ce33082..3de0bef88338 100644 --- a/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,True,True).sql +++ b/PostgreSQL.14.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.14.LinqService,True,True,True).sql @@ -21,3 +21,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE testdata.public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..6cb47e2c5b24 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TestTable" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "TestTable" +( + "ID" SERIAL NOT NULL, + "Field1" text NULL, + "Field2" text NULL, + "CreatedOn" TimeStamp NULL, + + CONSTRAINT "PK_TestTable" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ID", + t1."Field1", + t1."Field2", + t1."CreatedOn" +FROM + "TestTable" t1 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE "TestTable" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.14.LinqService).sql index 5fb08ec6c3e3..966f473a2dc0 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.14.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TempTable" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE IF NOT EXISTS "TempTable" +( + "ID" Int NOT NULL +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +INSERT INTO "TempTable" +( + "ID" +) +SELECT + p."ParentID" +FROM + "Parent" p + +BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL SELECT @@ -7,3 +32,8 @@ FROM "Parent" p INNER JOIN "TempTable" t ON p."ParentID" = t."ID" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TempTable" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..01cbb7813740 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.14.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson" t1 +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.14.LinqService,100).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.14.LinqService,100).sql index bb25e096e75a..1a26b603755b 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.14.LinqService,100).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.14.LinqService,100).sql @@ -10,3 +10,20 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TableWithData" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.14.LinqService,200).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.14.LinqService,200).sql index bb25e096e75a..1a26b603755b 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.14.LinqService,200).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.14.LinqService,200).sql @@ -10,3 +10,20 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TableWithData" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.14.LinqService,100).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.14.LinqService,100).sql index a2bf0a5098ed..c1a7f4d37eac 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.14.LinqService,100).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.14.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.14.LinqService,200).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.14.LinqService,200).sql index a2bf0a5098ed..c1a7f4d37eac 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.14.LinqService,200).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.14.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.14.LinqService,100).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.14.LinqService,100).sql index bb25e096e75a..0cccd258f054 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.14.LinqService,100).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.14.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.14.LinqService,200).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.14.LinqService,200).sql index bb25e096e75a..33877ebb4097 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.14.LinqService,200).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.14.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,100).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,100).sql index a2bf0a5098ed..6e6187144696 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,100).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,200).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,200).sql index a2bf0a5098ed..b75f75a4510b 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,200).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.14.LinqService,100).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.14.LinqService,100).sql index bb25e096e75a..7e4828703248 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.14.LinqService,100).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.14.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.14.LinqService,200).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.14.LinqService,200).sql index bb25e096e75a..7e4828703248 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.14.LinqService,200).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.14.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,100).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,100).sql index a2bf0a5098ed..2914980a33ca 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,100).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,200).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,200).sql index a2bf0a5098ed..2914980a33ca 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,200).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.14.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..78b11ecd7a8f --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..ec8dd2ccc3f8 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..ec8dd2ccc3f8 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.14.LinqService).sql index c515c0e79b6c..aa68500679b8 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.14.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) DECLARE @FirstName Text(6) -- String SET @FirstName = 'Steven' DECLARE @LastName Text(4) -- String @@ -54,3 +94,32 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" p +WHERE + p."FirstName" = 'Steven' AND p."LastName" = 'King' AND + p."Gender" = 'M' + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.14.LinqService).sql index 7fe97a9b1dc8..5359ef449899 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.14.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..4dfe51f34b5c --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.14.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPatient" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "xxPatient" +( + "PersonID" Int NOT NULL, + "Diagnosis" text NULL, + + CONSTRAINT "PK_xxPatient" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPatient" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.14.LinqService).sql index 7fe97a9b1dc8..4d059c58e2b2 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.14.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.14.LinqService).sql index 7fe97a9b1dc8..4d059c58e2b2 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.14.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.14.LinqService).sql index 271448786b4d..f1edfa2c4ba9 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.14.LinqService).sql @@ -24,6 +24,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.14.LinqService).sql index 271448786b4d..f1edfa2c4ba9 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.14.LinqService).sql @@ -24,6 +24,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.14.LinqService).sql index 53a45f58e49c..a7ef56ba004b 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.14.LinqService).sql @@ -34,6 +34,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Text(5) -- String +SET @p = 'John0' + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) DECLARE @FirstName Text(5) -- String @@ -62,6 +79,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Text(5) -- String +SET @p = 'John1' + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.14.LinqService,1).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.14.LinqService,1).sql index 9ed5069e2e36..0a912a4a9b6e 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.14.LinqService,1).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.14.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :Id, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.14.LinqService,2).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.14.LinqService,2).sql index 9ed5069e2e36..03613a02fc75 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.14.LinqService,2).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.14.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :Id, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,1).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,1).sql index 9ed5069e2e36..f48d0339ec92 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,1).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,2).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,2).sql index 9ed5069e2e36..c2a5c33c9767 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,2).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.14.LinqService,100).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.14.LinqService,100).sql index ae1250097c61..dc3ebbd1ae54 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.14.LinqService,100).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.14.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.14.LinqService,200).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.14.LinqService,200).sql index 269af1cfd64d..cfc40eac371b 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.14.LinqService,200).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.14.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.14.LinqService,100).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.14.LinqService,100).sql index 3ff4d33ee636..847d68dd4e00 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.14.LinqService,100).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.14.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.14.LinqService,200).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.14.LinqService,200).sql index 08bf25341e1e..4b7c940477fd 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.14.LinqService,200).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.14.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.14.LinqService,1).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.14.LinqService,1).sql index 9ed5069e2e36..64f619c85fa0 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.14.LinqService,1).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.14.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Id", + "Value", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Id, + :Value, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.14.LinqService,2).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.14.LinqService,2).sql index 9ed5069e2e36..79718ecdc8e6 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.14.LinqService,2).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.14.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Id", + "Value", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Id, + :Value, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,1).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,1).sql index 9ed5069e2e36..f48d0339ec92 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,1).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,2).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,2).sql index 9ed5069e2e36..c2a5c33c9767 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,2).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.14.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..4e8aa6c9ad1f --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = p2."ParentID" +FROM + "Parent" p2 +WHERE + "Parent"."ParentID" < 3 AND "Parent"."ParentID" = p2."ParentID" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..bcadb2dd532e --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" +SET + "ParentID" = "Parent"."ParentID" + 1 +WHERE + "Parent"."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..bcadb2dd532e --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" +SET + "ParentID" = "Parent"."ParentID" + 1 +WHERE + "Parent"."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..92b446bc39c3 --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +FROM + "Parent" "a_Parent" +WHERE + "Child"."ChildID" = :id AND "a_Parent"."Value1" = 1 AND + "Child"."ParentID" = "a_Parent"."ParentID" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :p + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..61fd5329880e --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.14.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +FROM + "Child" child_1 +WHERE + child_1."ChildID" = 10000 AND child_1."ParentID" = "Parent"."ParentID" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..61fd5329880e --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.14.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +FROM + "Child" child_1 +WHERE + child_1."ChildID" = 10000 AND child_1."ParentID" = "Parent"."ParentID" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.14.LinqService).sql new file mode 100644 index 000000000000..03be9ed7726c --- /dev/null +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.14.LinqService).sql @@ -0,0 +1,107 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +UPDATE + "xxPerson" +SET + "FirstName" = :FirstName, + "LastName" = :LastName, + "MiddleName" = :MiddleName, + "Gender" = :Gender +WHERE + "xxPerson"."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.14.LinqService).sql index eed501ca438f..8b5a613f548d 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.14.LinqService).sql @@ -31,3 +31,60 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + t1."PersonID", + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +LIMIT 1 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Gender Text(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName Text(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName Text -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName Text(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer -- Int32 +SET @ID = 5 + +UPDATE + "Person" +SET + "Gender" = :Gender, + "FirstName" = :Name_FirstName, + "MiddleName" = :Name_MiddleName, + "LastName" = :Name_LastName +WHERE + "Person"."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + t1."PersonID", + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +LIMIT 1 + diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql index 71408fd571ab..f49a9eabac83 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql @@ -1,436 +1,17 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + s."ValueStr", + "DestinationTable"."Value" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.14.LinqService).sql index 71408fd571ab..4cb9ad6e46bd 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.14.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.14.LinqService).sql index 71408fd571ab..63f250dde1cd 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.14.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = t1."Id", + "Value" = t1."Value", + "ValueStr" = t1."ValueStr" +FROM + "TableWithData" t1 +WHERE + t1."Id" = 3 AND "DestinationTable"."Id" = t1."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql index 71408fd571ab..f49a9eabac83 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql @@ -1,436 +1,17 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + s."ValueStr", + "DestinationTable"."Value" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.14.LinqService).sql index 71408fd571ab..4cb9ad6e46bd 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.14.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.14.LinqService).sql index 71408fd571ab..63f250dde1cd 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.14.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = t1."Id", + "Value" = t1."Value", + "ValueStr" = t1."ValueStr" +FROM + "TableWithData" t1 +WHERE + t1."Id" = 3 AND "DestinationTable"."Id" = t1."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql index 381bfe195e3f..65868339a492 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" > 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.14.LinqService).sql index 381bfe195e3f..03433a935c4e 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.14.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" = 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql index 381bfe195e3f..832279c80678 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.14.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Id" = "TableWithData"."Id", + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" > 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.14.LinqService).sql b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.14.LinqService).sql index 381bfe195e3f..533514985a1f 100644 --- a/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.14.LinqService).sql +++ b/PostgreSQL.14.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.14.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Id" = "TableWithData"."Id", + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" = 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.14/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.14).sql b/PostgreSQL.14/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.14).sql new file mode 100644 index 000000000000..c3901a193d1c --- /dev/null +++ b/PostgreSQL.14/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.14).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.14/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.14).sql b/PostgreSQL.14/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.14).sql new file mode 100644 index 000000000000..d029bd40d534 --- /dev/null +++ b/PostgreSQL.14/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.14).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.14/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.14).sql b/PostgreSQL.14/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.14).sql new file mode 100644 index 000000000000..d029bd40d534 --- /dev/null +++ b/PostgreSQL.14/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.14).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.14 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + From cdfc5c34811c7f4219952678021d0a66fb2094eb Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 22:06:31 +0100 Subject: [PATCH 21/40] [Linux / Oracle 18c] baselines --- ...l4Async(Oracle.18.Managed.LinqService).sql | 18 ++ ...y2Async(Oracle.18.Managed.LinqService).sql | 30 +++ ...le1Test(Oracle.18.Managed.LinqService).sql | 9 + ...le2Test(Oracle.18.Managed.LinqService).sql | 11 + ...st1Test(Oracle.18.Managed.LinqService).sql | 9 + ...st2Test(Oracle.18.Managed.LinqService).sql | 11 + ...yncTest(Oracle.18.Managed.LinqService).sql | 18 ++ ...yncTest(Oracle.18.Managed.LinqService).sql | 15 ++ ...kipTest(Oracle.18.Managed.LinqService).sql | 16 ++ ...Default(Oracle.18.Managed.LinqService).sql | 20 ++ ...yncTest(Oracle.18.Managed.LinqService).sql | 21 ++ ...yncTest(Oracle.18.Managed.LinqService).sql | 21 ++ ...stAsync(Oracle.18.Managed.LinqService).sql | 40 ++++ ...tAsync2(Oracle.18.Managed.LinqService).sql | 40 ++++ ...ncdTest(Oracle.18.Managed.LinqService).sql | 16 ++ ...t3Async(Oracle.18.Managed.LinqService).sql | 28 +++ ...stAsync(Oracle.18.Managed.LinqService).sql | 36 +++ ...stAsync(Oracle.18.Managed.LinqService).sql | 24 ++ ...tAsync2(Oracle.18.Managed.LinqService).sql | 24 ++ ...tAsync1(Oracle.18.Managed.LinqService).sql | 28 +++ ...tAsync2(Oracle.18.Managed.LinqService).sql | 28 +++ ...stAsync(Oracle.18.Managed.LinqService).sql | 24 ++ ...tAsync2(Oracle.18.Managed.LinqService).sql | 24 ++ ...teAsync(Oracle.18.Managed.LinqService).sql | 197 ++-------------- ...teAsync(Oracle.18.Managed.LinqService).sql | 191 +--------------- ...teAsync(Oracle.18.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.18.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.18.Managed.LinqService).sql | 191 +--------------- ...orAsync(Oracle.18.Managed.LinqService).sql | 191 +--------------- ...orAsync(Oracle.18.Managed.LinqService).sql | 191 +--------------- ...teAsync(Oracle.18.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.18.Managed.LinqService).sql | 193 +--------------- ...t1Async(Oracle.18.Managed.LinqService).sql | 19 ++ ...ntAsync(Oracle.18.Managed.LinqService).sql | 97 ++++++++ ...edAsync(Oracle.18.Managed.LinqService).sql | 80 +++++++ ...t1Async(Oracle.18.Managed.LinqService).sql | 8 + ...t2Async(Oracle.18.Managed.LinqService).sql | 10 + ...x1Async(Oracle.18.Managed.LinqService).sql | 16 ++ ...sue4602(Oracle.18.Managed.LinqService).sql | 194 +--------------- ...7_Async(Oracle.18.Managed.LinqService).sql | 31 +++ ...saction(Oracle.18.Managed.LinqService).sql | 31 +++ ...onAsync(Oracle.18.Managed.LinqService).sql | 25 ++ ...t1Async(Oracle.18.Managed.LinqService).sql | 11 + ...18Async(Oracle.18.Managed.LinqService).sql | 14 ++ ...r1Async(Oracle.18.Managed.LinqService).sql | 7 + ...132Test(Oracle.18.Managed.LinqService).sql | 213 ++++++++++++++++++ ...c(Oracle.18.Managed.LinqService,False).sql | 16 ++ ...nc(Oracle.18.Managed.LinqService,True).sql | 16 ++ ...c(Oracle.18.Managed.LinqService,False).sql | 16 ++ ...nc(Oracle.18.Managed.LinqService,True).sql | 16 ++ ...p1Async(Oracle.18.Managed.LinqService).sql | 106 +-------- ...c(Oracle.18.Managed.LinqService,False).sql | 20 ++ ...nc(Oracle.18.Managed.LinqService,True).sql | 24 ++ ...c(Oracle.18.Managed.LinqService,False).sql | 12 + ...nc(Oracle.18.Managed.LinqService,True).sql | 12 + ...c(Oracle.18.Managed.LinqService,False).sql | 12 + ...nc(Oracle.18.Managed.LinqService,True).sql | 14 ++ ...c(Oracle.18.Managed.LinqService,False).sql | 12 + ...nc(Oracle.18.Managed.LinqService,True).sql | 14 ++ ...c(Oracle.18.Managed.LinqService,False).sql | 10 + ...nc(Oracle.18.Managed.LinqService,True).sql | 12 + ...Managed.LinqService,False,False,False).sql | 23 ++ ....Managed.LinqService,False,False,True).sql | 23 ++ ....Managed.LinqService,False,True,False).sql | 23 ++ ...8.Managed.LinqService,False,True,True).sql | 23 ++ ....Managed.LinqService,True,False,False).sql | 23 ++ ...8.Managed.LinqService,True,False,True).sql | 23 ++ ...8.Managed.LinqService,True,True,False).sql | 23 ++ ...18.Managed.LinqService,True,True,True).sql | 23 ++ ...e1Async(Oracle.18.Managed.LinqService).sql | 77 +++++++ ...leAsync(Oracle.18.Managed.LinqService).sql | 53 +++++ ...meAsync(Oracle.18.Managed.LinqService).sql | 132 +++++++++++ ...t2Async(Oracle.18.Managed.LinqService).sql | 44 ++++ ...t3Async(Oracle.18.Managed.LinqService).sql | 46 ++++ ...t4Async(Oracle.18.Managed.LinqService).sql | 46 ++++ ...meAsync(Oracle.18.Managed.LinqService).sql | 112 +++++++++ ...e1Async(Oracle.18.Managed.LinqService).sql | 98 ++++++++ ...meAsync(Oracle.18.Managed.LinqService).sql | 163 ++++++++++++++ ...e3Async(Oracle.18.Managed.LinqService).sql | 98 ++++++++ ...3xAsync(Oracle.18.Managed.LinqService).sql | 104 +++++++++ ...y1Async(Oracle.18.Managed.LinqService).sql | 15 ++ ...y2Async(Oracle.18.Managed.LinqService).sql | 15 ++ ...y4Async(Oracle.18.Managed.LinqService).sql | 34 +++ ...eryAsyn(Oracle.18.Managed.LinqService).sql | 33 +++ ...bleAsyn(Oracle.18.Managed.LinqService).sql | 31 +++ ...nsAsync(Oracle.18.Managed.LinqService).sql | 127 ++++++++--- ...llAsync(Oracle.18.Managed.LinqService).sql | 131 +++++------ ...rtAsync(Oracle.18.Managed.LinqService).sql | 126 +++++------ ...stAsync(Oracle.18.Managed.LinqService).sql | 85 ++++--- ...nc(Oracle.18.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.18.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.18.Managed.LinqService,two).sql | 80 ++++--- ...nc(Oracle.18.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.18.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.18.Managed.LinqService,two).sql | 80 ++++--- ...nc(Oracle.18.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.18.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.18.Managed.LinqService,two).sql | 80 ++++--- ...12Async(Oracle.18.Managed.LinqService).sql | 28 +++ ...e1Async(Oracle.18.Managed.LinqService).sql | 54 +++++ ...e2Async(Oracle.18.Managed.LinqService).sql | 54 +++++ ...e4Async(Oracle.18.Managed.LinqService).sql | 63 ++++++ ...n1Async(Oracle.18.Managed.LinqService).sql | 47 ++++ ...syncOld(Oracle.18.Managed.LinqService).sql | 47 ++++ ...meAsync(Oracle.18.Managed.LinqService).sql | 150 ++++++++++++ ...x1Async(Oracle.18.Managed.LinqService).sql | 57 +++++ ...inq.AsyncTests.Test(Oracle.18.Managed).sql | 18 ++ ...nq.AsyncTests.Test1(Oracle.18.Managed).sql | 9 + ...ncTests.TestForEach(Oracle.18.Managed).sql | 9 + 109 files changed, 3865 insertions(+), 2457 deletions(-) create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.18.Managed.LinqService,False).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.18.Managed.LinqService,True).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.18.Managed.LinqService,False).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.18.Managed.LinqService,True).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.18.Managed.LinqService,False).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.18.Managed.LinqService,True).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.18.Managed.LinqService,False).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.18.Managed.LinqService,True).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.18.Managed.LinqService,False).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.18.Managed.LinqService,True).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.18.Managed.LinqService,False).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.18.Managed.LinqService,True).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.18.Managed.LinqService).sql create mode 100644 Oracle.18.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.18.Managed).sql create mode 100644 Oracle.18.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.18.Managed).sql create mode 100644 Oracle.18.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.18.Managed).sql diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..b5382e6175f2 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" <= 3 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..73889a158dde --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT DISTINCT + a_Parent1."ParentID" + FROM + "Child" t1 + INNER JOIN "Parent" a_Parent1 ON t1."ParentID" = a_Parent1."ParentID" + ) m_1 + INNER JOIN "Child" d + INNER JOIN "Parent" a_Parent1_1 ON d."ParentID" = a_Parent1_1."ParentID" + ON m_1."ParentID" = a_Parent1_1."ParentID" + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + a_Parent1."ParentID" +FROM + "Child" t1 + INNER JOIN "Parent" a_Parent1 ON t1."ParentID" = a_Parent1."ParentID" +GROUP BY + a_Parent1."ParentID" + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..bb537ae7355e --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..fea1c5a779a5 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..bb537ae7355e --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..fea1c5a779a5 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..6e4359cc84b7 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +SELECT + CASE + WHEN :ID IN ( + SELECT + t1."PersonID" + FROM + "Person" t1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..942d0f662488 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."PersonID" = 1 +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.18.Managed.LinqService).sql index f3999ce35ee6..8f33109ed952 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.18.Managed.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY t1."ParentID" OFFSET :skip ROWS FETCH NEXT :take ROWS ONLY +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @skip Int32 +SET @skip = 1 +DECLARE @take Int32 +SET @take = 2 + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +ORDER BY + t1."ParentID" +OFFSET :skip ROWS FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..b948b81f1fdd --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 +DECLARE @p_1 Int32 +SET @p_1 = 2 +DECLARE @p_2 Int32 +SET @p_2 = 3 +DECLARE @param Int32 +SET @param = 4 + +SELECT + o."ParentID", + o."Value1" +FROM + "Parent" o +WHERE + o."ParentID" IN (:p, :p_1, :p_2) OR o."ParentID" = :param +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..5fe8dd72e95d --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..5fe8dd72e95d --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..eb956a4a59b5 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..eb956a4a59b5 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..776f4434ae71 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = :p +ORDER BY + x."ParentID" DESC +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..fc910203a8d0 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT :p ROWS ONLY + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT :p ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..38163dec3aa8 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..460cc8e5de67 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..460cc8e5de67 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..21ac33a62883 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..21ac33a62883 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..d4c472ce0a0a --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..d4c472ce0a0a --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.18.Managed.LinqService).sql index ca2657a15a50..6b7cf02b9647 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.18.Managed.LinqService).sql @@ -1,183 +1,20 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "AsyncDataTable" c_1 + WHERE + c_1."Id" = :p ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; + THEN 1 + ELSE 0 + END +FROM SYS.DUAL diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.18.Managed.LinqService).sql index ca2657a15a50..cca1cefbf618 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.18.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.18.Managed.LinqService).sql index ca2657a15a50..6bb176c1f1d2 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.18.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 1 ROWS ONLY diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.18.Managed.LinqService).sql index ca2657a15a50..6bb176c1f1d2 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.18.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 1 ROWS ONLY diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.18.Managed.LinqService).sql index ca2657a15a50..cca1cefbf618 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.18.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.18.Managed.LinqService).sql index ca2657a15a50..14e53bd36acf 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.18.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MAX(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.18.Managed.LinqService).sql index ca2657a15a50..d3a42a454c7a 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.18.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MIN(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.18.Managed.LinqService).sql index ca2657a15a50..83bc5392286a 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.18.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.18.Managed.LinqService).sql index ca2657a15a50..83bc5392286a 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.18.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..0365bd2945ec --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" = 1 +UNION ALL +SELECT + p_1."ParentID", + p_1."Value1" +FROM + "Parent" p_1 +WHERE + p_1."ParentID" = 2 + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.18.Managed.LinqService).sql index 6cbcaa760e29..e6f0c83ca74c 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.18.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value Varchar2(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.18.Managed.LinqService).sql index 49ada8824362..eb05e3b8724f 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.18.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value Varchar2(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" r +SET + "Stamp" = r."Stamp" + 1, + "Value" = :Value +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" r +SET + "Stamp" = r."Stamp" + 1, + "Value" = :Value +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 @@ -28,6 +84,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 @@ -38,6 +106,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..71dd9d9b7e5d --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" t1 + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..ce69d8cd1e9b --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" > 2 + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..6d798dd9f475 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" c_1 + LEFT JOIN "Parent" a_Parent ON c_1."ParentID" = a_Parent."ParentID" + WHERE + a_Parent."ParentID" = t1."ParentID" + )) +FROM + "Parent" t1 + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.18.Managed.LinqService).sql index c772cbf9d8c4..3e90c4d094e1 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.18.Managed.LinqService).sql @@ -1,187 +1,11 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicParent" - ( - ID Int NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY (ID) - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -CREATE SEQUENCE "SIDENTITY_DynamicParent" - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -CREATE OR REPLACE TRIGGER "TIDENTITY_DynamicParent" -BEFORE INSERT ON "DynamicParent" FOR EACH ROW -BEGIN - SELECT "SIDENTITY_DynamicParent".NEXTVAL INTO :NEW.ID FROM dual; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicChild" - ( - ID Int NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY (ID) - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -CREATE SEQUENCE "SIDENTITY_DynamicChild" - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -CREATE OR REPLACE TRIGGER "TIDENTITY_DynamicChild" -BEFORE INSERT ON "DynamicChild" FOR EACH ROW -BEGIN - SELECT "SIDENTITY_DynamicChild".NEXTVAL INTO :NEW.ID FROM dual; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + it.ID +FROM + "DynamicParent" it + LEFT JOIN "DynamicChild" a_Child ON it.ID = a_Child."ParentID" +WHERE + a_Child.ID = 123 diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.18.Managed.LinqService).sql index 603bc96ba632..b9889e470204 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.18.Managed.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransactionAsync(ReadCommitted) BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.18.Managed.LinqService).sql index c1149c21683c..79ef5e1dcc3d 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.18.Managed.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransaction BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..8ae932f75b66 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" a_Children + INNER JOIN "GrandChild" a_GrandChildren ON a_Children."ParentID" = a_GrandChildren."ParentID" AND a_Children."ChildID" = a_GrandChildren."ChildID" + WHERE + p."ParentID" = a_Children."ParentID" + ) +FROM + "Parent" p + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..38dd100e3305 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +WHERE + t1."Value1" = 1 + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..5ba85abaa218 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT DISTINCT + p1."PersonID", + p1."Gender", + p1."FirstName", + p1."LastName" +FROM + "Person" p1 +WHERE + p1."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + p1."Gender" = 'F' + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..f89c3dbc71f3 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,7 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + 1 +FROM SYS.DUAL + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..bd0413093109 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."MiddleName", + COUNT(*) +FROM + "Person" x +WHERE + x."MiddleName" IS NOT NULL +GROUP BY + x."MiddleName" +UNION ALL +SELECT + x_1."MiddleName", + COUNT(*) +FROM + "Person" x_1 +WHERE + x_1."MiddleName" IS NOT NULL +GROUP BY + x_1."MiddleName" +UNION ALL +SELECT + x_2."MiddleName", + COUNT(*) +FROM + "Person" x_2 +WHERE + x_2."MiddleName" IS NOT NULL +GROUP BY + x_2."MiddleName" +UNION ALL +SELECT + x_3."MiddleName", + COUNT(*) +FROM + "Person" x_3 +WHERE + x_3."MiddleName" IS NOT NULL +GROUP BY + x_3."MiddleName" +UNION ALL +SELECT + x_4."MiddleName", + COUNT(*) +FROM + "Person" x_4 +WHERE + x_4."MiddleName" IS NOT NULL +GROUP BY + x_4."MiddleName" +UNION ALL +SELECT + x_5."MiddleName", + COUNT(*) +FROM + "Person" x_5 +WHERE + x_5."MiddleName" IS NOT NULL +GROUP BY + x_5."MiddleName" +UNION ALL +SELECT + x_6."MiddleName", + COUNT(*) +FROM + "Person" x_6 +WHERE + x_6."MiddleName" IS NOT NULL +GROUP BY + x_6."MiddleName" +UNION ALL +SELECT + x_7."MiddleName", + COUNT(*) +FROM + "Person" x_7 +WHERE + x_7."MiddleName" IS NOT NULL +GROUP BY + x_7."MiddleName" +UNION ALL +SELECT + x_8."MiddleName", + COUNT(*) +FROM + "Person" x_8 +WHERE + x_8."MiddleName" IS NOT NULL +GROUP BY + x_8."MiddleName" +UNION ALL +SELECT + x_9."MiddleName", + COUNT(*) +FROM + "Person" x_9 +WHERE + x_9."MiddleName" IS NOT NULL +GROUP BY + x_9."MiddleName" +UNION ALL +SELECT + x_10."MiddleName", + COUNT(*) +FROM + "Person" x_10 +WHERE + x_10."MiddleName" IS NOT NULL +GROUP BY + x_10."MiddleName" +UNION ALL +SELECT + x_11."MiddleName", + COUNT(*) +FROM + "Person" x_11 +WHERE + x_11."MiddleName" IS NOT NULL +GROUP BY + x_11."MiddleName" +UNION ALL +SELECT + x_12."MiddleName", + COUNT(*) +FROM + "Person" x_12 +WHERE + x_12."MiddleName" IS NOT NULL +GROUP BY + x_12."MiddleName" +UNION ALL +SELECT + x_13."MiddleName", + COUNT(*) +FROM + "Person" x_13 +WHERE + x_13."MiddleName" IS NOT NULL +GROUP BY + x_13."MiddleName" +UNION ALL +SELECT + x_14."MiddleName", + COUNT(*) +FROM + "Person" x_14 +WHERE + x_14."MiddleName" IS NOT NULL +GROUP BY + x_14."MiddleName" +UNION ALL +SELECT + x_15."MiddleName", + COUNT(*) +FROM + "Person" x_15 +WHERE + x_15."MiddleName" IS NOT NULL +GROUP BY + x_15."MiddleName" +UNION ALL +SELECT + x_16."MiddleName", + COUNT(*) +FROM + "Person" x_16 +WHERE + x_16."MiddleName" IS NOT NULL +GROUP BY + x_16."MiddleName" +UNION ALL +SELECT + x_17."MiddleName", + COUNT(*) +FROM + "Person" x_17 +WHERE + x_17."MiddleName" IS NOT NULL +GROUP BY + x_17."MiddleName" +UNION ALL +SELECT + x_18."MiddleName", + COUNT(*) +FROM + "Person" x_18 +WHERE + x_18."MiddleName" IS NOT NULL +GROUP BY + x_18."MiddleName" +UNION ALL +SELECT + x_19."MiddleName", + COUNT(*) +FROM + "Person" x_19 +WHERE + x_19."MiddleName" IS NOT NULL +GROUP BY + x_19."MiddleName" +UNION ALL +SELECT + x_20."MiddleName", + COUNT(*) +FROM + "Person" x_20 +WHERE + x_20."MiddleName" IS NOT NULL +GROUP BY + x_20."MiddleName" + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.18.Managed.LinqService,False).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.18.Managed.LinqService,False).sql new file mode 100644 index 000000000000..ec8611625174 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.18.Managed.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.18.Managed.LinqService,True).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.18.Managed.LinqService,True).sql new file mode 100644 index 000000000000..ec8611625174 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.18.Managed.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.18.Managed.LinqService,False).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.18.Managed.LinqService,False).sql new file mode 100644 index 000000000000..ec8611625174 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.18.Managed.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.18.Managed.LinqService,True).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.18.Managed.LinqService,True).sql new file mode 100644 index 000000000000..ec8611625174 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.18.Managed.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.18.Managed.LinqService).sql index f9c28ee1647c..e3e591a945e7 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.18.Managed.LinqService).sql @@ -1,97 +1,13 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "TakeSkipClass" - ( - "Value" VarChar(10) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @skip Int32 +SET @skip = 3 + +SELECT + t1."Value" as "Value_1" +FROM + "TakeSkipClass" t1 +ORDER BY + t1."Value" +OFFSET :skip ROWS diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.18.Managed.LinqService,False).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.18.Managed.LinqService,False).sql index e4c4598172be..793f035c7639 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.18.Managed.LinqService,False).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.18.Managed.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" ch FETCH NEXT 3 ROWS ONLY +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.18.Managed.LinqService,True).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.18.Managed.LinqService,True).sql index 61a9839e3cf9..69a57463cc5c 100644 --- a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.18.Managed.LinqService,True).sql +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.18.Managed.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" ch FETCH NEXT :take ROWS ONLY +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 2 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT :take ROWS ONLY + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.18.Managed.LinqService,False).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.18.Managed.LinqService,False).sql new file mode 100644 index 000000000000..5235bc33491e --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.18.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :n ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.18.Managed.LinqService,True).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.18.Managed.LinqService,True).sql new file mode 100644 index 000000000000..5235bc33491e --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.18.Managed.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :n ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.18.Managed.LinqService,False).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.18.Managed.LinqService,False).sql new file mode 100644 index 000000000000..4844bf6ab6ad --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.18.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.18.Managed.LinqService,True).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.18.Managed.LinqService,True).sql new file mode 100644 index 000000000000..7d628a646ba4 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.18.Managed.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.18.Managed.LinqService,False).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.18.Managed.LinqService,False).sql new file mode 100644 index 000000000000..26ff5d6fe6b2 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.18.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.18.Managed.LinqService,True).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.18.Managed.LinqService,True).sql new file mode 100644 index 000000000000..a4532a1488b4 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.18.Managed.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.18.Managed.LinqService,False).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.18.Managed.LinqService,False).sql new file mode 100644 index 000000000000..56bed02a2945 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.18.Managed.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.18.Managed.LinqService,True).sql b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.18.Managed.LinqService,True).sql new file mode 100644 index 000000000000..e5da855c5468 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.18.Managed.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,False,False).sql b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,False,False).sql index da297af9c192..d2f9aafd0bc4 100644 --- a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,False,False).sql +++ b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,False,False).sql @@ -10,3 +10,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,False,True).sql b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,False,True).sql index 502c3b7da3b3..338b28ed4e52 100644 --- a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,False,True).sql +++ b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,False,True).sql @@ -19,3 +19,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,True,False).sql b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,True,False).sql index da297af9c192..d2f9aafd0bc4 100644 --- a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,True,False).sql +++ b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,True,False).sql @@ -10,3 +10,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,True,True).sql b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,True,True).sql index 502c3b7da3b3..338b28ed4e52 100644 --- a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,True,True).sql +++ b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,False,True,True).sql @@ -19,3 +19,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,False,False).sql b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,False,False).sql index af8db618e038..b1a2ba25f582 100644 --- a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,False,False).sql +++ b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,False,False).sql @@ -17,3 +17,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2"@"xe" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,False,True).sql b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,False,True).sql index c17621f7044b..039e99ce16a1 100644 --- a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,False,True).sql +++ b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,False,True).sql @@ -26,3 +26,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2"@"xe" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,True,False).sql b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,True,False).sql index af8db618e038..b1a2ba25f582 100644 --- a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,True,False).sql +++ b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,True,False).sql @@ -17,3 +17,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2"@"xe" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,True,True).sql b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,True,True).sql index c17621f7044b..039e99ce16a1 100644 --- a/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,True,True).sql +++ b/Oracle.18.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.18.Managed.LinqService,True,True,True).sql @@ -26,3 +26,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2"@"xe" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..2bbb0e556e0b --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,77 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "TestTable" +( + ID Int NOT NULL, + "Field1" VarChar(50) NULL, + "Field2" VarChar(255) NULL, + "CreatedOn" timestamp NULL, + + CONSTRAINT "PK_TestTable" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_TestTable" + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_TestTable" +BEFORE INSERT ON "TestTable" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_TestTable".NEXTVAL INTO :NEW.ID FROM dual; +END; + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1.ID, + t1."Field1", + t1."Field2", + t1."CreatedOn" +FROM + "TestTable" t1 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_TestTable"'; + EXECUTE IMMEDIATE 'DROP TABLE "TestTable"'; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.18.Managed.LinqService).sql index c20815472208..ea4f72cf805d 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.18.Managed.LinqService).sql @@ -1,4 +1,45 @@ BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE ' + CREATE TABLE "TempTable" + ( + ID Int NOT NULL + ) + '; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -955 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "TempTable" +( + ID +) +SELECT + p."ParentID" +FROM + "Parent" p + +BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 SELECT @@ -7,3 +48,15 @@ FROM "Parent" p INNER JOIN "TempTable" t ON p."ParentID" = t.ID +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..8f143e3a48dd --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,132 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson_ol" t1 +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..761469296bbd --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..7d12a149f6e7 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..7d12a149f6e7 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.18.Managed.LinqService).sql index a9debf1f0846..46086e3b6f36 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.18.Managed.LinqService).sql @@ -1,5 +1,59 @@ BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) DECLARE @FirstName Varchar2(6) -- String SET @FirstName = 'Steven' DECLARE @LastName Varchar2(4) -- String @@ -58,3 +112,61 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" p +WHERE + p."FirstName" = 'Steven' AND p."LastName" = 'King' AND + p."Gender" = 'M' + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.18.Managed.LinqService).sql index 09a0fec804fd..9e6565025f78 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.18.Managed.LinqService).sql @@ -38,3 +38,101 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc0' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc1' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc2' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..88a0146165ef --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,163 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPatient" +( + "PersonID" Int NOT NULL, + "Diagnosis" VarChar(255) NULL, + + CONSTRAINT "PK_xxPatient" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.18.Managed.LinqService).sql index 09a0fec804fd..e25c68b1d59d 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.18.Managed.LinqService).sql @@ -38,3 +38,101 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.18.Managed.LinqService).sql index 09a0fec804fd..a356c2684274 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.18.Managed.LinqService).sql @@ -38,3 +38,107 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 0 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 1 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 2 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.18.Managed.LinqService).sql index f5037d161003..6e05377cd6ca 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.18.Managed.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.18.Managed.LinqService).sql index f5037d161003..6e05377cd6ca 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.18.Managed.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.18.Managed.LinqService).sql index 752b39392512..f4c7e2f21eaf 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.18.Managed.LinqService).sql @@ -36,6 +36,23 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Varchar2(5) -- String +SET @p = 'John0' + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) DECLARE @FirstName Varchar2(5) -- String @@ -66,6 +83,23 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Varchar2(5) -- String +SET @p = 'John1' + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.18.Managed.LinqService).sql index aee80d1bcabe..5a4ce30ad265 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.18.Managed.LinqService).sql @@ -218,6 +218,39 @@ VALUES :Field4 ) +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +MERGE INTO "TestMerge1" Target +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 + WHERE + t1."Id" = 5 +) "Source" +ON (Target."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.18.Managed.LinqService).sql index aee80d1bcabe..d966f1c144e8 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.18.Managed.LinqService).sql @@ -218,6 +218,37 @@ VALUES :Field4 ) +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +MERGE INTO "TestMerge1" Target +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 +) "Source" +ON (Target."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Oracle.18.Managed Oracle.Managed Oracle12 diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.18.Managed.LinqService).sql index b53b8befb0b1..a3c8d4d5e7d2 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.18.Managed.LinqService).sql @@ -1,43 +1,98 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_N" < 0 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + 3002, + "source_N" + ) +SELECT + 42 as "source_N", + 3000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" t1 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 3002 BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT ALL +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + 4002, + "source_N" + ) +SELECT + 4000 as "source_ID", + 42 as "source_N" +FROM SYS.DUAL + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" t1 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 4001 OR x.ID = 4002 diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.18.Managed.LinqService).sql index 2461691dbabd..51cbbc1f82e3 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.18.Managed.LinqService).sql @@ -1,85 +1,70 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" < 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) +WHEN 1 = 1 THEN + INTO "Dest2" + ( + ID, + "Int" + ) + VALUES + ( + "source_ID" + 3, + "source_ID" + 1 + ) +SELECT + 42 as "source_N", + 1000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 1001 BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest2" - ( - ID Int NOT NULL, - "Int" Int NOT NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest2" x +WHERE + x.ID = 1003 diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.18.Managed.LinqService).sql index 2461691dbabd..1f0ee6383321 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.18.Managed.LinqService).sql @@ -1,85 +1,65 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) + INTO "Dest2" + ( + ID, + "Int" + ) + VALUES + ( + "source_ID" + 3, + "source_ID" + 1 + ) +SELECT + 1000 as "source_ID", + 42 as "source_N" +FROM SYS.DUAL BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest2" - ( - ID Int NOT NULL, - "Int" Int NOT NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest2" x +WHERE + x.ID = 1003 diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.18.Managed.LinqService).sql index b53b8befb0b1..4e3819f231ed 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.18.Managed.LinqService).sql @@ -1,43 +1,60 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT FIRST +WHEN "source_N" < 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) +ELSE + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 3, + "source_N" + ) +SELECT + 42 as "source_N", + 1000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 1003 diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.18.Managed.LinqService,null).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.18.Managed.LinqService,null).sql index b53b8befb0b1..f57948f25921 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.18.Managed.LinqService,null).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.18.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2 -- String +SET @value = NULL -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.18.Managed.LinqService,one).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.18.Managed.LinqService,one).sql index b53b8befb0b1..a29c703a4457 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.18.Managed.LinqService,one).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.18.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.18.Managed.LinqService,two).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.18.Managed.LinqService,two).sql index b53b8befb0b1..69a21233984e 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.18.Managed.LinqService,two).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.18.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.18.Managed.LinqService,null).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.18.Managed.LinqService,null).sql index b53b8befb0b1..67761a55c516 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.18.Managed.LinqService,null).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.18.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2 -- String +SET @value = NULL +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.18.Managed.LinqService,one).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.18.Managed.LinqService,one).sql index b53b8befb0b1..2aae99e9f574 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.18.Managed.LinqService,one).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.18.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.18.Managed.LinqService,two).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.18.Managed.LinqService,two).sql index b53b8befb0b1..426139bb2e9a 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.18.Managed.LinqService,two).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.18.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.18.Managed.LinqService,null).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.18.Managed.LinqService,null).sql index b53b8befb0b1..45b4dab087d6 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.18.Managed.LinqService,null).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.18.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2 -- String +SET @value = NULL -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.18.Managed.LinqService,one).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.18.Managed.LinqService,one).sql index b53b8befb0b1..8612a46acd76 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.18.Managed.LinqService,one).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.18.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.18.Managed.LinqService,two).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.18.Managed.LinqService,two).sql index b53b8befb0b1..e80f1f949ef8 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.18.Managed.LinqService,two).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.18.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.18.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..7b20a8da9ba0 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = ( + SELECT + p2_1."ParentID" + FROM + "Parent" p1_1 + INNER JOIN "Parent" p2_1 ON p1_1."ParentID" = p2_1."ParentID" + WHERE + p1_1."ParentID" < 3 AND "Parent"."ParentID" = p1_1."ParentID" AND + ("Parent"."Value1" = p1_1."Value1" OR "Parent"."Value1" IS NULL AND p1_1."Value1" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "Parent" p1 + INNER JOIN "Parent" p2 ON p1."ParentID" = p2."ParentID" + WHERE + p1."ParentID" < 3 AND "Parent"."ParentID" = p1."ParentID" AND + ("Parent"."Value1" = p1."Value1" OR "Parent"."Value1" IS NULL AND p1."Value1" IS NULL) + ) + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..f68ca95d861d --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" p +SET + "ParentID" = p."ParentID" + 1 +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..f68ca95d861d --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" p +SET + "ParentID" = p."ParentID" + 1 +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..6bdbdd5033bc --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +WHERE + EXISTS( + SELECT + * + FROM + "Child" c_1 + LEFT JOIN "Parent" a_Parent ON c_1."ParentID" = a_Parent."ParentID" + WHERE + c_1."ChildID" = :id AND + a_Parent."Value1" = 1 AND + "Child"."ParentID" = c_1."ParentID" AND + "Child"."ChildID" = c_1."ChildID" + ) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :p + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..f0dcced73c65 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" child_1 + LEFT JOIN "Parent" a_Parent ON child_1."ParentID" = a_Parent."ParentID" + WHERE + child_1."ChildID" = 10000 AND "Parent"."ParentID" = a_Parent."ParentID" AND + ("Parent"."Value1" = a_Parent."Value1" OR "Parent"."Value1" IS NULL AND a_Parent."Value1" IS NULL) + ) + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..f0dcced73c65 --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" child_1 + LEFT JOIN "Parent" a_Parent ON child_1."ParentID" = a_Parent."ParentID" + WHERE + child_1."ChildID" = 10000 AND "Parent"."ParentID" = a_Parent."ParentID" AND + ("Parent"."Value1" = a_Parent."Value1" OR "Parent"."Value1" IS NULL AND a_Parent."Value1" IS NULL) + ) + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.18.Managed.LinqService).sql new file mode 100644 index 000000000000..99d1daf27eea --- /dev/null +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.18.Managed.LinqService).sql @@ -0,0 +1,150 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Int32 +SET @ID = 1 + +UPDATE + "xxPerson_ol" t1 +SET + "FirstName" = :FirstName, + "LastName" = :LastName, + "MiddleName" = :MiddleName, + "Gender" = :Gender +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + diff --git a/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.18.Managed.LinqService).sql b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.18.Managed.LinqService).sql index a361be3d2097..b017d57ccd80 100644 --- a/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.18.Managed.LinqService).sql +++ b/Oracle.18.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.18.Managed.LinqService).sql @@ -38,3 +38,60 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + t1."PersonID" as ID, + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Gender Varchar2(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName Varchar2(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName Varchar2 -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName Varchar2(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int32 +SET @ID = 5 + +UPDATE + "Person" t1 +SET + "Gender" = :Gender, + "FirstName" = :Name_FirstName, + "MiddleName" = :Name_MiddleName, + "LastName" = :Name_LastName +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + t1."PersonID" as ID, + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.18.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.18.Managed).sql b/Oracle.18.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.18.Managed).sql new file mode 100644 index 000000000000..3c43939c8281 --- /dev/null +++ b/Oracle.18.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.18.Managed).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.18.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.18.Managed).sql b/Oracle.18.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.18.Managed).sql new file mode 100644 index 000000000000..bb537ae7355e --- /dev/null +++ b/Oracle.18.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.18.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.18.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.18.Managed).sql b/Oracle.18.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.18.Managed).sql new file mode 100644 index 000000000000..bb537ae7355e --- /dev/null +++ b/Oracle.18.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.18.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.18.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + From 21e2aa697a589d63705632afb05cd020ef85d0de Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 21:08:29 +0000 Subject: [PATCH 22/40] [Windows / SQL Server EXTRAS] baselines --- ...Async(SqlServer.Contained.LinqService).sql | 13 + ...Async(SqlServer.Contained.LinqService).sql | 30 ++ ...1Test(SqlServer.Contained.LinqService).sql | 9 + ...2Test(SqlServer.Contained.LinqService).sql | 11 + ...1Test(SqlServer.Contained.LinqService).sql | 9 + ...2Test(SqlServer.Contained.LinqService).sql | 11 + ...cTest(SqlServer.Contained.LinqService).sql | 13 + ...cTest(SqlServer.Contained.LinqService).sql | 14 + ...pTest(SqlServer.Contained.LinqService).sql | 16 + ...fault(SqlServer.Contained.LinqService).sql | 19 + ...cTest(SqlServer.Contained.LinqService).sql | 21 + ...cTest(SqlServer.Contained.LinqService).sql | 21 + ...Async(SqlServer.Contained.LinqService).sql | 30 ++ ...sync2(SqlServer.Contained.LinqService).sql | 30 ++ ...dTest(SqlServer.Contained.LinqService).sql | 15 + ...Async(SqlServer.Contained.LinqService).sql | 26 + ...Async(SqlServer.Contained.LinqService).sql | 26 + ...Async(SqlServer.Contained.LinqService).sql | 24 + ...sync2(SqlServer.Contained.LinqService).sql | 24 + ...sync1(SqlServer.Contained.LinqService).sql | 26 + ...sync2(SqlServer.Contained.LinqService).sql | 26 + ...Async(SqlServer.Contained.LinqService).sql | 24 + ...sync2(SqlServer.Contained.LinqService).sql | 24 + ...Async(SqlServer.Contained.LinqService).sql | 172 +------ ...Async(SqlServer.Contained.LinqService).sql | 169 +------ ...Async(SqlServer.Contained.LinqService).sql | 170 +------ ...Async(SqlServer.Contained.LinqService).sql | 170 +------ ...Async(SqlServer.Contained.LinqService).sql | 169 +------ ...Async(SqlServer.Contained.LinqService).sql | 169 +------ ...Async(SqlServer.Contained.LinqService).sql | 169 +------ ...Async(SqlServer.Contained.LinqService).sql | 170 +------ ...Async(SqlServer.Contained.LinqService).sql | 170 +------ ...Async(SqlServer.Contained.LinqService).sql | 19 + ...Async(SqlServer.Contained.LinqService).sql | 99 ++++ ...Async(SqlServer.Contained.LinqService).sql | 84 ++++ ...Async(SqlServer.Contained.LinqService).sql | 8 + ...Async(SqlServer.Contained.LinqService).sql | 10 + ...Async(SqlServer.Contained.LinqService).sql | 17 + ...e4602(SqlServer.Contained.LinqService).sql | 50 +- ...Async(SqlServer.Contained.LinqService).sql | 29 ++ ...ction(SqlServer.Contained.LinqService).sql | 29 ++ ...Async(SqlServer.Contained.LinqService).sql | 25 + ...Async(SqlServer.Contained.LinqService).sql | 11 + ...Async(SqlServer.Contained.LinqService).sql | 14 + ...Async(SqlServer.Contained.LinqService).sql | 6 + ...2Test(SqlServer.Contained.LinqService).sql | 213 ++++++++ ...SqlServer.Contained.LinqService,False).sql | 16 + ...(SqlServer.Contained.LinqService,True).sql | 16 + ...SqlServer.Contained.LinqService,False).sql | 16 + ...(SqlServer.Contained.LinqService,True).sql | 16 + ...Async(SqlServer.Contained.LinqService).sql | 84 +--- ...SqlServer.Contained.LinqService,False).sql | 18 + ...(SqlServer.Contained.LinqService,True).sql | 22 + ...SqlServer.Contained.LinqService,False).sql | 11 + ...(SqlServer.Contained.LinqService,True).sql | 11 + ...SqlServer.Contained.LinqService,False).sql | 11 + ...(SqlServer.Contained.LinqService,True).sql | 13 + ...SqlServer.Contained.LinqService,False).sql | 11 + ...(SqlServer.Contained.LinqService,True).sql | 13 + ...SqlServer.Contained.LinqService,False).sql | 9 + ...(SqlServer.Contained.LinqService,True).sql | 11 + ...ntained.LinqService,False,False,False).sql | 16 + ...ontained.LinqService,False,False,True).sql | 16 + ...ontained.LinqService,False,True,False).sql | 16 + ...Contained.LinqService,False,True,True).sql | 16 + ...Async(SqlServer.Contained.LinqService).sql | 34 ++ ...Async(SqlServer.Contained.LinqService).sql | 31 ++ ...Async(SqlServer.Contained.LinqService).sql | 89 ++++ ...t(SqlServer.Contained.LinqService,100).sql | 18 + ...t(SqlServer.Contained.LinqService,200).sql | 18 + ...d(SqlServer.Contained.LinqService,100).sql | 13 + ...d(SqlServer.Contained.LinqService,200).sql | 13 + ...t(SqlServer.Contained.LinqService,100).sql | 15 + ...t(SqlServer.Contained.LinqService,200).sql | 15 + ...d(SqlServer.Contained.LinqService,100).sql | 15 + ...d(SqlServer.Contained.LinqService,200).sql | 15 + ...t(SqlServer.Contained.LinqService,100).sql | 21 + ...t(SqlServer.Contained.LinqService,200).sql | 21 + ...t(SqlServer.Contained.LinqService,100).sql | 12 + ...t(SqlServer.Contained.LinqService,200).sql | 12 + ...d(SqlServer.Contained.LinqService,100).sql | 12 + ...d(SqlServer.Contained.LinqService,200).sql | 12 + ...Async(SqlServer.Contained.LinqService).sql | 46 ++ ...Async(SqlServer.Contained.LinqService).sql | 48 ++ ...Async(SqlServer.Contained.LinqService).sql | 48 ++ ...Async(SqlServer.Contained.LinqService).sql | 69 +++ ...Async(SqlServer.Contained.LinqService).sql | 97 ++++ ...Async(SqlServer.Contained.LinqService).sql | 149 ++++++ ...Async(SqlServer.Contained.LinqService).sql | 97 ++++ ...Async(SqlServer.Contained.LinqService).sql | 103 ++++ ...Async(SqlServer.Contained.LinqService).sql | 14 + ...Async(SqlServer.Contained.LinqService).sql | 14 + ...Async(SqlServer.Contained.LinqService).sql | 32 ++ ...est(SqlServer.Contained.LinqService,1).sql | 41 +- ...est(SqlServer.Contained.LinqService,2).sql | 41 +- ...est(SqlServer.Contained.LinqService,1).sql | 41 +- ...est(SqlServer.Contained.LinqService,2).sql | 41 +- ...c(SqlServer.Contained.LinqService,100).sql | 24 + ...c(SqlServer.Contained.LinqService,200).sql | 24 + ...d(SqlServer.Contained.LinqService,100).sql | 24 + ...d(SqlServer.Contained.LinqService,200).sql | 24 + ...est(SqlServer.Contained.LinqService,1).sql | 41 +- ...est(SqlServer.Contained.LinqService,2).sql | 41 +- ...est(SqlServer.Contained.LinqService,1).sql | 41 +- ...est(SqlServer.Contained.LinqService,2).sql | 41 +- ...Async(SqlServer.Contained.LinqService).sql | 54 +++ ...Async(SqlServer.Contained.LinqService).sql | 53 ++ ...yAsyn(SqlServer.Contained.LinqService).sql | 40 ++ ...eAsyn(SqlServer.Contained.LinqService).sql | 38 ++ ...Async(SqlServer.Contained.LinqService).sql | 13 + ...Async(SqlServer.Contained.LinqService).sql | 54 +++ ...Async(SqlServer.Contained.LinqService).sql | 54 +++ ...Async(SqlServer.Contained.LinqService).sql | 55 +++ ...Async(SqlServer.Contained.LinqService).sql | 41 ++ ...ncOld(SqlServer.Contained.LinqService).sql | 41 ++ ...Async(SqlServer.Contained.LinqService).sql | 105 ++++ ...Async(SqlServer.Contained.LinqService).sql | 55 +++ ...Async(SqlServer.Contained.LinqService).sql | 23 + ...Async(SqlServer.Contained.LinqService).sql | 454 +---------------- ...ecord(SqlServer.Contained.LinqService).sql | 456 +----------------- ...Async(SqlServer.Contained.LinqService).sql | 23 + ...Async(SqlServer.Contained.LinqService).sql | 451 +---------------- ...pdate(SqlServer.Contained.LinqService).sql | 450 +---------------- ...ecord(SqlServer.Contained.LinqService).sql | 452 +---------------- ...utOld(SqlServer.Contained.LinqService).sql | 450 +---------------- ...pdate(SqlServer.Contained.LinqService).sql | 449 +---------------- ...ecord(SqlServer.Contained.LinqService).sql | 451 +---------------- ...Async(SqlServer.Contained.LinqService).sql | 23 + ...Async(SqlServer.Contained.LinqService).sql | 454 +---------------- ...ecord(SqlServer.Contained.LinqService).sql | 456 +----------------- ...Async(SqlServer.Contained.LinqService).sql | 23 + ...Async(SqlServer.Contained.LinqService).sql | 451 +---------------- ...pdate(SqlServer.Contained.LinqService).sql | 450 +---------------- ...ecord(SqlServer.Contained.LinqService).sql | 452 +---------------- ...utOld(SqlServer.Contained.LinqService).sql | 450 +---------------- ...pdate(SqlServer.Contained.LinqService).sql | 449 +---------------- ...ecord(SqlServer.Contained.LinqService).sql | 451 +---------------- ...Async(SqlServer.Contained.LinqService).sql | 21 + ...Async(SqlServer.Contained.LinqService).sql | 233 +-------- ...ecord(SqlServer.Contained.LinqService).sql | 233 +-------- ...Async(SqlServer.Contained.LinqService).sql | 229 +-------- ...ecord(SqlServer.Contained.LinqService).sql | 229 +-------- ...utOld(SqlServer.Contained.LinqService).sql | 228 +-------- ...ecord(SqlServer.Contained.LinqService).sql | 228 +-------- ...Async(SqlServer.Contained.LinqService).sql | 21 + ...Async(SqlServer.Contained.LinqService).sql | 22 + ...Async(SqlServer.Contained.LinqService).sql | 234 +-------- ...ecord(SqlServer.Contained.LinqService).sql | 234 +-------- ...Async(SqlServer.Contained.LinqService).sql | 230 +-------- ...ecord(SqlServer.Contained.LinqService).sql | 230 +-------- ...utOld(SqlServer.Contained.LinqService).sql | 229 +-------- ...ecord(SqlServer.Contained.LinqService).sql | 229 +-------- ...Async(SqlServer.Contained.LinqService).sql | 22 + ...nc(SqlServer.Contained.MS.LinqService).sql | 13 + ...nc(SqlServer.Contained.MS.LinqService).sql | 30 ++ ...st(SqlServer.Contained.MS.LinqService).sql | 9 + ...st(SqlServer.Contained.MS.LinqService).sql | 11 + ...st(SqlServer.Contained.MS.LinqService).sql | 9 + ...st(SqlServer.Contained.MS.LinqService).sql | 11 + ...st(SqlServer.Contained.MS.LinqService).sql | 13 + ...st(SqlServer.Contained.MS.LinqService).sql | 14 + ...st(SqlServer.Contained.MS.LinqService).sql | 16 + ...lt(SqlServer.Contained.MS.LinqService).sql | 19 + ...st(SqlServer.Contained.MS.LinqService).sql | 21 + ...st(SqlServer.Contained.MS.LinqService).sql | 21 + ...nc(SqlServer.Contained.MS.LinqService).sql | 30 ++ ...c2(SqlServer.Contained.MS.LinqService).sql | 30 ++ ...st(SqlServer.Contained.MS.LinqService).sql | 15 + ...nc(SqlServer.Contained.MS.LinqService).sql | 26 + ...nc(SqlServer.Contained.MS.LinqService).sql | 26 + ...nc(SqlServer.Contained.MS.LinqService).sql | 24 + ...c2(SqlServer.Contained.MS.LinqService).sql | 24 + ...c1(SqlServer.Contained.MS.LinqService).sql | 26 + ...c2(SqlServer.Contained.MS.LinqService).sql | 26 + ...nc(SqlServer.Contained.MS.LinqService).sql | 24 + ...c2(SqlServer.Contained.MS.LinqService).sql | 24 + ...nc(SqlServer.Contained.MS.LinqService).sql | 172 +------ ...nc(SqlServer.Contained.MS.LinqService).sql | 169 +------ ...nc(SqlServer.Contained.MS.LinqService).sql | 170 +------ ...nc(SqlServer.Contained.MS.LinqService).sql | 170 +------ ...nc(SqlServer.Contained.MS.LinqService).sql | 169 +------ ...nc(SqlServer.Contained.MS.LinqService).sql | 169 +------ ...nc(SqlServer.Contained.MS.LinqService).sql | 169 +------ ...nc(SqlServer.Contained.MS.LinqService).sql | 170 +------ ...nc(SqlServer.Contained.MS.LinqService).sql | 170 +------ ...nc(SqlServer.Contained.MS.LinqService).sql | 19 + ...nc(SqlServer.Contained.MS.LinqService).sql | 99 ++++ ...nc(SqlServer.Contained.MS.LinqService).sql | 84 ++++ ...nc(SqlServer.Contained.MS.LinqService).sql | 8 + ...nc(SqlServer.Contained.MS.LinqService).sql | 10 + ...nc(SqlServer.Contained.MS.LinqService).sql | 17 + ...02(SqlServer.Contained.MS.LinqService).sql | 50 +- ...nc(SqlServer.Contained.MS.LinqService).sql | 29 ++ ...on(SqlServer.Contained.MS.LinqService).sql | 29 ++ ...nc(SqlServer.Contained.MS.LinqService).sql | 25 + ...nc(SqlServer.Contained.MS.LinqService).sql | 11 + ...nc(SqlServer.Contained.MS.LinqService).sql | 14 + ...nc(SqlServer.Contained.MS.LinqService).sql | 6 + ...st(SqlServer.Contained.MS.LinqService).sql | 213 ++++++++ ...Server.Contained.MS.LinqService,False).sql | 16 + ...lServer.Contained.MS.LinqService,True).sql | 16 + ...Server.Contained.MS.LinqService,False).sql | 16 + ...lServer.Contained.MS.LinqService,True).sql | 16 + ...nc(SqlServer.Contained.MS.LinqService).sql | 84 +--- ...Server.Contained.MS.LinqService,False).sql | 18 + ...lServer.Contained.MS.LinqService,True).sql | 22 + ...Server.Contained.MS.LinqService,False).sql | 11 + ...lServer.Contained.MS.LinqService,True).sql | 11 + ...Server.Contained.MS.LinqService,False).sql | 11 + ...lServer.Contained.MS.LinqService,True).sql | 13 + ...Server.Contained.MS.LinqService,False).sql | 11 + ...lServer.Contained.MS.LinqService,True).sql | 13 + ...Server.Contained.MS.LinqService,False).sql | 9 + ...lServer.Contained.MS.LinqService,True).sql | 11 + ...ined.MS.LinqService,False,False,False).sql | 16 + ...ained.MS.LinqService,False,False,True).sql | 16 + ...ained.MS.LinqService,False,True,False).sql | 16 + ...tained.MS.LinqService,False,True,True).sql | 16 + ...nc(SqlServer.Contained.MS.LinqService).sql | 34 ++ ...nc(SqlServer.Contained.MS.LinqService).sql | 31 ++ ...nc(SqlServer.Contained.MS.LinqService).sql | 89 ++++ ...qlServer.Contained.MS.LinqService,100).sql | 18 + ...qlServer.Contained.MS.LinqService,200).sql | 18 + ...qlServer.Contained.MS.LinqService,100).sql | 13 + ...qlServer.Contained.MS.LinqService,200).sql | 13 + ...qlServer.Contained.MS.LinqService,100).sql | 15 + ...qlServer.Contained.MS.LinqService,200).sql | 15 + ...qlServer.Contained.MS.LinqService,100).sql | 15 + ...qlServer.Contained.MS.LinqService,200).sql | 15 + ...qlServer.Contained.MS.LinqService,100).sql | 21 + ...qlServer.Contained.MS.LinqService,200).sql | 21 + ...qlServer.Contained.MS.LinqService,100).sql | 12 + ...qlServer.Contained.MS.LinqService,200).sql | 12 + ...qlServer.Contained.MS.LinqService,100).sql | 12 + ...qlServer.Contained.MS.LinqService,200).sql | 12 + ...nc(SqlServer.Contained.MS.LinqService).sql | 46 ++ ...nc(SqlServer.Contained.MS.LinqService).sql | 48 ++ ...nc(SqlServer.Contained.MS.LinqService).sql | 48 ++ ...nc(SqlServer.Contained.MS.LinqService).sql | 69 +++ ...nc(SqlServer.Contained.MS.LinqService).sql | 97 ++++ ...nc(SqlServer.Contained.MS.LinqService).sql | 149 ++++++ ...nc(SqlServer.Contained.MS.LinqService).sql | 97 ++++ ...nc(SqlServer.Contained.MS.LinqService).sql | 103 ++++ ...nc(SqlServer.Contained.MS.LinqService).sql | 14 + ...nc(SqlServer.Contained.MS.LinqService).sql | 14 + ...nc(SqlServer.Contained.MS.LinqService).sql | 32 ++ ...(SqlServer.Contained.MS.LinqService,1).sql | 41 +- ...(SqlServer.Contained.MS.LinqService,2).sql | 41 +- ...(SqlServer.Contained.MS.LinqService,1).sql | 41 +- ...(SqlServer.Contained.MS.LinqService,2).sql | 41 +- ...qlServer.Contained.MS.LinqService,100).sql | 24 + ...qlServer.Contained.MS.LinqService,200).sql | 24 + ...qlServer.Contained.MS.LinqService,100).sql | 24 + ...qlServer.Contained.MS.LinqService,200).sql | 24 + ...(SqlServer.Contained.MS.LinqService,1).sql | 41 +- ...(SqlServer.Contained.MS.LinqService,2).sql | 41 +- ...(SqlServer.Contained.MS.LinqService,1).sql | 41 +- ...(SqlServer.Contained.MS.LinqService,2).sql | 41 +- ...nc(SqlServer.Contained.MS.LinqService).sql | 54 +++ ...nc(SqlServer.Contained.MS.LinqService).sql | 53 ++ ...yn(SqlServer.Contained.MS.LinqService).sql | 40 ++ ...yn(SqlServer.Contained.MS.LinqService).sql | 38 ++ ...nc(SqlServer.Contained.MS.LinqService).sql | 13 + ...nc(SqlServer.Contained.MS.LinqService).sql | 54 +++ ...nc(SqlServer.Contained.MS.LinqService).sql | 54 +++ ...nc(SqlServer.Contained.MS.LinqService).sql | 55 +++ ...nc(SqlServer.Contained.MS.LinqService).sql | 41 ++ ...ld(SqlServer.Contained.MS.LinqService).sql | 41 ++ ...nc(SqlServer.Contained.MS.LinqService).sql | 105 ++++ ...nc(SqlServer.Contained.MS.LinqService).sql | 55 +++ ...nc(SqlServer.Contained.MS.LinqService).sql | 23 + ...nc(SqlServer.Contained.MS.LinqService).sql | 454 +---------------- ...rd(SqlServer.Contained.MS.LinqService).sql | 456 +----------------- ...nc(SqlServer.Contained.MS.LinqService).sql | 23 + ...nc(SqlServer.Contained.MS.LinqService).sql | 451 +---------------- ...te(SqlServer.Contained.MS.LinqService).sql | 450 +---------------- ...rd(SqlServer.Contained.MS.LinqService).sql | 452 +---------------- ...ld(SqlServer.Contained.MS.LinqService).sql | 450 +---------------- ...te(SqlServer.Contained.MS.LinqService).sql | 449 +---------------- ...rd(SqlServer.Contained.MS.LinqService).sql | 451 +---------------- ...nc(SqlServer.Contained.MS.LinqService).sql | 23 + ...nc(SqlServer.Contained.MS.LinqService).sql | 454 +---------------- ...rd(SqlServer.Contained.MS.LinqService).sql | 456 +----------------- ...nc(SqlServer.Contained.MS.LinqService).sql | 23 + ...nc(SqlServer.Contained.MS.LinqService).sql | 451 +---------------- ...te(SqlServer.Contained.MS.LinqService).sql | 450 +---------------- ...rd(SqlServer.Contained.MS.LinqService).sql | 452 +---------------- ...ld(SqlServer.Contained.MS.LinqService).sql | 450 +---------------- ...te(SqlServer.Contained.MS.LinqService).sql | 449 +---------------- ...rd(SqlServer.Contained.MS.LinqService).sql | 451 +---------------- ...nc(SqlServer.Contained.MS.LinqService).sql | 21 + ...nc(SqlServer.Contained.MS.LinqService).sql | 233 +-------- ...rd(SqlServer.Contained.MS.LinqService).sql | 233 +-------- ...nc(SqlServer.Contained.MS.LinqService).sql | 229 +-------- ...rd(SqlServer.Contained.MS.LinqService).sql | 229 +-------- ...ld(SqlServer.Contained.MS.LinqService).sql | 228 +-------- ...rd(SqlServer.Contained.MS.LinqService).sql | 228 +-------- ...nc(SqlServer.Contained.MS.LinqService).sql | 21 + ...nc(SqlServer.Contained.MS.LinqService).sql | 22 + ...nc(SqlServer.Contained.MS.LinqService).sql | 234 +-------- ...rd(SqlServer.Contained.MS.LinqService).sql | 234 +-------- ...nc(SqlServer.Contained.MS.LinqService).sql | 230 +-------- ...rd(SqlServer.Contained.MS.LinqService).sql | 230 +-------- ...ld(SqlServer.Contained.MS.LinqService).sql | 229 +-------- ...rd(SqlServer.Contained.MS.LinqService).sql | 229 +-------- ...nc(SqlServer.Contained.MS.LinqService).sql | 22 + ...syncTests.Test(SqlServer.Contained.MS).sql | 18 + ...yncTests.Test1(SqlServer.Contained.MS).sql | 9 + ...ts.TestForEach(SqlServer.Contained.MS).sql | 9 + ...q.AsyncTests.Test(SqlServer.Contained).sql | 18 + ....AsyncTests.Test1(SqlServer.Contained).sql | 9 + ...Tests.TestForEach(SqlServer.Contained).sql | 9 + ...ts.All4Async(SqlServer.SA.LinqService).sql | 13 + ...roupBy2Async(SqlServer.SA.LinqService).sql | 30 ++ ...merable1Test(SqlServer.SA.LinqService).sql | 9 + ...merable2Test(SqlServer.SA.LinqService).sql | 11 + ...bleCast1Test(SqlServer.SA.LinqService).sql | 9 + ...bleCast2Test(SqlServer.SA.LinqService).sql | 11 + ...insAsyncTest(SqlServer.SA.LinqService).sql | 13 + ...rstAsyncTest(SqlServer.SA.LinqService).sql | 14 + ...TakeSkipTest(SqlServer.SA.LinqService).sql | 16 + ...rstOrDefault(SqlServer.SA.LinqService).sql | 19 + ...kupAsyncTest(SqlServer.SA.LinqService).sql | 21 + ...entAsyncTest(SqlServer.SA.LinqService).sql | 21 + ...AnyTestAsync(SqlServer.SA.LinqService).sql | 30 ++ ...nyTestAsync2(SqlServer.SA.LinqService).sql | 30 ++ ...hoAsyncdTest(SqlServer.SA.LinqService).sql | 15 + ...edTest3Async(SqlServer.SA.LinqService).sql | 26 + ...insTestAsync(SqlServer.SA.LinqService).sql | 26 + ...untTestAsync(SqlServer.SA.LinqService).sql | 24 + ...ntTestAsync2(SqlServer.SA.LinqService).sql | 24 + ...ntTestAsync1(SqlServer.SA.LinqService).sql | 26 + ...ntTestAsync2(SqlServer.SA.LinqService).sql | 26 + ...MaxTestAsync(SqlServer.SA.LinqService).sql | 24 + ...axTestAsync2(SqlServer.SA.LinqService).sql | 24 + ...edicateAsync(SqlServer.SA.LinqService).sql | 172 +------ ...edicateAsync(SqlServer.SA.LinqService).sql | 169 +------ ...edicateAsync(SqlServer.SA.LinqService).sql | 170 +------ ...edicateAsync(SqlServer.SA.LinqService).sql | 170 +------ ...edicateAsync(SqlServer.SA.LinqService).sql | 169 +------ ...electorAsync(SqlServer.SA.LinqService).sql | 169 +------ ...electorAsync(SqlServer.SA.LinqService).sql | 169 +------ ...edicateAsync(SqlServer.SA.LinqService).sql | 170 +------ ...edicateAsync(SqlServer.SA.LinqService).sql | 170 +------ ...Concat1Async(SqlServer.SA.LinqService).sql | 19 + ...crementAsync(SqlServer.SA.LinqService).sql | 99 ++++ ...ilteredAsync(SqlServer.SA.LinqService).sql | 84 ++++ ....Count1Async(SqlServer.SA.LinqService).sql | 8 + ....Count2Async(SqlServer.SA.LinqService).sql | 10 + ...eryMax1Async(SqlServer.SA.LinqService).sql | 17 + ...ts.Issue4602(SqlServer.SA.LinqService).sql | 50 +- ...ue4057_Async(SqlServer.SA.LinqService).sql | 29 ++ ...tTransaction(SqlServer.SA.LinqService).sql | 29 ++ ...ressionAsync(SqlServer.SA.LinqService).sql | 25 + ...s.Cast1Async(SqlServer.SA.LinqService).sql | 11 + ....Test18Async(SqlServer.SA.LinqService).sql | 14 + ...ameter1Async(SqlServer.SA.LinqService).sql | 6 + ...ssue3132Test(SqlServer.SA.LinqService).sql | 213 ++++++++ ...2Async(SqlServer.SA.LinqService,False).sql | 16 + ...t2Async(SqlServer.SA.LinqService,True).sql | 16 + ...3Async(SqlServer.SA.LinqService,False).sql | 16 + ...t3Async(SqlServer.SA.LinqService,True).sql | 16 + ...leSkip1Async(SqlServer.SA.LinqService).sql | 84 +--- ...1Async(SqlServer.SA.LinqService,False).sql | 18 + ...e1Async(SqlServer.SA.LinqService,True).sql | 22 + ...2Async(SqlServer.SA.LinqService,False).sql | 11 + ...e2Async(SqlServer.SA.LinqService,True).sql | 11 + ...3Async(SqlServer.SA.LinqService,False).sql | 11 + ...e3Async(SqlServer.SA.LinqService,True).sql | 13 + ...4Async(SqlServer.SA.LinqService,False).sql | 11 + ...e4Async(SqlServer.SA.LinqService,True).sql | 13 + ...5Async(SqlServer.SA.LinqService,False).sql | 9 + ...e5Async(SqlServer.SA.LinqService,True).sql | 11 + ...rver.SA.LinqService,False,False,False).sql | 16 + ...erver.SA.LinqService,False,False,True).sql | 16 + ...erver.SA.LinqService,False,True,False).sql | 16 + ...Server.SA.LinqService,False,True,True).sql | 16 + ...eTable1Async(SqlServer.SA.LinqService).sql | 34 ++ ...teTableAsync(SqlServer.SA.LinqService).sql | 31 ++ ...bleNameAsync(SqlServer.SA.LinqService).sql | 89 ++++ ...syncTest(SqlServer.SA.LinqService,100).sql | 18 + ...syncTest(SqlServer.SA.LinqService,200).sql | 18 + ...leRecord(SqlServer.SA.LinqService,100).sql | 13 + ...leRecord(SqlServer.SA.LinqService,200).sql | 13 + ...syncTest(SqlServer.SA.LinqService,100).sql | 15 + ...syncTest(SqlServer.SA.LinqService,200).sql | 15 + ...leRecord(SqlServer.SA.LinqService,100).sql | 15 + ...leRecord(SqlServer.SA.LinqService,200).sql | 15 + ...syncTest(SqlServer.SA.LinqService,100).sql | 21 + ...syncTest(SqlServer.SA.LinqService,200).sql | 21 + ...syncTest(SqlServer.SA.LinqService,100).sql | 12 + ...syncTest(SqlServer.SA.LinqService,200).sql | 12 + ...leRecord(SqlServer.SA.LinqService,100).sql | 12 + ...leRecord(SqlServer.SA.LinqService,200).sql | 12 + ...Insert2Async(SqlServer.SA.LinqService).sql | 46 ++ ...Insert3Async(SqlServer.SA.LinqService).sql | 48 ++ ...Insert4Async(SqlServer.SA.LinqService).sql | 48 ++ ...bleNameAsync(SqlServer.SA.LinqService).sql | 69 +++ ...eplace1Async(SqlServer.SA.LinqService).sql | 97 ++++ ...bleNameAsync(SqlServer.SA.LinqService).sql | 149 ++++++ ...Update3Async(SqlServer.SA.LinqService).sql | 97 ++++ ...pdate3xAsync(SqlServer.SA.LinqService).sql | 103 ++++ ...entity1Async(SqlServer.SA.LinqService).sql | 14 + ...entity2Async(SqlServer.SA.LinqService).sql | 14 + ...entity4Async(SqlServer.SA.LinqService).sql | 32 ++ ...jAsyncTest(SqlServer.SA.LinqService,1).sql | 41 +- ...jAsyncTest(SqlServer.SA.LinqService,2).sql | 41 +- ...rAsyncTest(SqlServer.SA.LinqService,1).sql | 41 +- ...rAsyncTest(SqlServer.SA.LinqService,2).sql | 41 +- ...estAsync(SqlServer.SA.LinqService,100).sql | 24 + ...estAsync(SqlServer.SA.LinqService,200).sql | 24 + ...leRecord(SqlServer.SA.LinqService,100).sql | 24 + ...leRecord(SqlServer.SA.LinqService,200).sql | 24 + ...jAsyncTest(SqlServer.SA.LinqService,1).sql | 41 +- ...jAsyncTest(SqlServer.SA.LinqService,2).sql | 41 +- ...rAsyncTest(SqlServer.SA.LinqService,1).sql | 41 +- ...rAsyncTest(SqlServer.SA.LinqService,2).sql | 41 +- ...putFullAsync(SqlServer.SA.LinqService).sql | 54 +++ ...tActionAsync(SqlServer.SA.LinqService).sql | 53 ++ ...romQueryAsyn(SqlServer.SA.LinqService).sql | 40 ++ ...romTableAsyn(SqlServer.SA.LinqService).sql | 38 ++ ...pdate12Async(SqlServer.SA.LinqService).sql | 13 + ...Update1Async(SqlServer.SA.LinqService).sql | 54 +++ ...Update2Async(SqlServer.SA.LinqService).sql | 54 +++ ...Update4Async(SqlServer.SA.LinqService).sql | 55 +++ ...iation1Async(SqlServer.SA.LinqService).sql | 41 ++ ...ion1AsyncOld(SqlServer.SA.LinqService).sql | 41 ++ ...bleNameAsync(SqlServer.SA.LinqService).sql | 105 ++++ ...omplex1Async(SqlServer.SA.LinqService).sql | 55 +++ ...ntoTestAsync(SqlServer.SA.LinqService).sql | 23 + ...putTestAsync(SqlServer.SA.LinqService).sql | 454 +---------------- ...SingleRecord(SqlServer.SA.LinqService).sql | 456 +----------------- ...ntoTestAsync(SqlServer.SA.LinqService).sql | 23 + ...putTestAsync(SqlServer.SA.LinqService).sql | 451 +---------------- ...ernateUpdate(SqlServer.SA.LinqService).sql | 450 +---------------- ...SingleRecord(SqlServer.SA.LinqService).sql | 452 +---------------- ...ncWithoutOld(SqlServer.SA.LinqService).sql | 450 +---------------- ...ernateUpdate(SqlServer.SA.LinqService).sql | 449 +---------------- ...SingleRecord(SqlServer.SA.LinqService).sql | 451 +---------------- ...ntoTestAsync(SqlServer.SA.LinqService).sql | 23 + ...putTestAsync(SqlServer.SA.LinqService).sql | 454 +---------------- ...SingleRecord(SqlServer.SA.LinqService).sql | 456 +----------------- ...ntoTestAsync(SqlServer.SA.LinqService).sql | 23 + ...putTestAsync(SqlServer.SA.LinqService).sql | 451 +---------------- ...ernateUpdate(SqlServer.SA.LinqService).sql | 450 +---------------- ...SingleRecord(SqlServer.SA.LinqService).sql | 452 +---------------- ...ncWithoutOld(SqlServer.SA.LinqService).sql | 450 +---------------- ...ernateUpdate(SqlServer.SA.LinqService).sql | 449 +---------------- ...SingleRecord(SqlServer.SA.LinqService).sql | 451 +---------------- ...ntoTestAsync(SqlServer.SA.LinqService).sql | 21 + ...putTestAsync(SqlServer.SA.LinqService).sql | 233 +-------- ...SingleRecord(SqlServer.SA.LinqService).sql | 233 +-------- ...putTestAsync(SqlServer.SA.LinqService).sql | 229 +-------- ...SingleRecord(SqlServer.SA.LinqService).sql | 229 +-------- ...ncWithoutOld(SqlServer.SA.LinqService).sql | 228 +-------- ...SingleRecord(SqlServer.SA.LinqService).sql | 228 +-------- ...estIntoAsync(SqlServer.SA.LinqService).sql | 21 + ...ntoTestAsync(SqlServer.SA.LinqService).sql | 22 + ...putTestAsync(SqlServer.SA.LinqService).sql | 234 +-------- ...SingleRecord(SqlServer.SA.LinqService).sql | 234 +-------- ...putTestAsync(SqlServer.SA.LinqService).sql | 230 +-------- ...SingleRecord(SqlServer.SA.LinqService).sql | 230 +-------- ...ncWithoutOld(SqlServer.SA.LinqService).sql | 229 +-------- ...SingleRecord(SqlServer.SA.LinqService).sql | 229 +-------- ...estIntoAsync(SqlServer.SA.LinqService).sql | 22 + ...All4Async(SqlServer.SA.MS.LinqService).sql | 13 + ...pBy2Async(SqlServer.SA.MS.LinqService).sql | 30 ++ ...able1Test(SqlServer.SA.MS.LinqService).sql | 9 + ...able2Test(SqlServer.SA.MS.LinqService).sql | 11 + ...Cast1Test(SqlServer.SA.MS.LinqService).sql | 9 + ...Cast2Test(SqlServer.SA.MS.LinqService).sql | 11 + ...AsyncTest(SqlServer.SA.MS.LinqService).sql | 13 + ...AsyncTest(SqlServer.SA.MS.LinqService).sql | 14 + ...eSkipTest(SqlServer.SA.MS.LinqService).sql | 16 + ...OrDefault(SqlServer.SA.MS.LinqService).sql | 19 + ...AsyncTest(SqlServer.SA.MS.LinqService).sql | 21 + ...AsyncTest(SqlServer.SA.MS.LinqService).sql | 21 + ...TestAsync(SqlServer.SA.MS.LinqService).sql | 30 ++ ...estAsync2(SqlServer.SA.MS.LinqService).sql | 30 ++ ...syncdTest(SqlServer.SA.MS.LinqService).sql | 15 + ...est3Async(SqlServer.SA.MS.LinqService).sql | 26 + ...TestAsync(SqlServer.SA.MS.LinqService).sql | 26 + ...TestAsync(SqlServer.SA.MS.LinqService).sql | 24 + ...estAsync2(SqlServer.SA.MS.LinqService).sql | 24 + ...estAsync1(SqlServer.SA.MS.LinqService).sql | 26 + ...estAsync2(SqlServer.SA.MS.LinqService).sql | 26 + ...TestAsync(SqlServer.SA.MS.LinqService).sql | 24 + ...estAsync2(SqlServer.SA.MS.LinqService).sql | 24 + ...cateAsync(SqlServer.SA.MS.LinqService).sql | 172 +------ ...cateAsync(SqlServer.SA.MS.LinqService).sql | 169 +------ ...cateAsync(SqlServer.SA.MS.LinqService).sql | 170 +------ ...cateAsync(SqlServer.SA.MS.LinqService).sql | 170 +------ ...cateAsync(SqlServer.SA.MS.LinqService).sql | 169 +------ ...ctorAsync(SqlServer.SA.MS.LinqService).sql | 169 +------ ...ctorAsync(SqlServer.SA.MS.LinqService).sql | 169 +------ ...cateAsync(SqlServer.SA.MS.LinqService).sql | 170 +------ ...cateAsync(SqlServer.SA.MS.LinqService).sql | 170 +------ ...cat1Async(SqlServer.SA.MS.LinqService).sql | 19 + ...mentAsync(SqlServer.SA.MS.LinqService).sql | 99 ++++ ...eredAsync(SqlServer.SA.MS.LinqService).sql | 84 ++++ ...unt1Async(SqlServer.SA.MS.LinqService).sql | 8 + ...unt2Async(SqlServer.SA.MS.LinqService).sql | 10 + ...Max1Async(SqlServer.SA.MS.LinqService).sql | 17 + ...Issue4602(SqlServer.SA.MS.LinqService).sql | 50 +- ...057_Async(SqlServer.SA.MS.LinqService).sql | 29 ++ ...ansaction(SqlServer.SA.MS.LinqService).sql | 29 ++ ...sionAsync(SqlServer.SA.MS.LinqService).sql | 25 + ...ast1Async(SqlServer.SA.MS.LinqService).sql | 11 + ...st18Async(SqlServer.SA.MS.LinqService).sql | 14 + ...ter1Async(SqlServer.SA.MS.LinqService).sql | 6 + ...e3132Test(SqlServer.SA.MS.LinqService).sql | 213 ++++++++ ...ync(SqlServer.SA.MS.LinqService,False).sql | 16 + ...sync(SqlServer.SA.MS.LinqService,True).sql | 16 + ...ync(SqlServer.SA.MS.LinqService,False).sql | 16 + ...sync(SqlServer.SA.MS.LinqService,True).sql | 16 + ...kip1Async(SqlServer.SA.MS.LinqService).sql | 84 +--- ...ync(SqlServer.SA.MS.LinqService,False).sql | 18 + ...sync(SqlServer.SA.MS.LinqService,True).sql | 22 + ...ync(SqlServer.SA.MS.LinqService,False).sql | 11 + ...sync(SqlServer.SA.MS.LinqService,True).sql | 11 + ...ync(SqlServer.SA.MS.LinqService,False).sql | 11 + ...sync(SqlServer.SA.MS.LinqService,True).sql | 13 + ...ync(SqlServer.SA.MS.LinqService,False).sql | 11 + ...sync(SqlServer.SA.MS.LinqService,True).sql | 13 + ...ync(SqlServer.SA.MS.LinqService,False).sql | 9 + ...sync(SqlServer.SA.MS.LinqService,True).sql | 11 + ...r.SA.MS.LinqService,False,False,False).sql | 16 + ...er.SA.MS.LinqService,False,False,True).sql | 16 + ...er.SA.MS.LinqService,False,True,False).sql | 16 + ...ver.SA.MS.LinqService,False,True,True).sql | 16 + ...ble1Async(SqlServer.SA.MS.LinqService).sql | 34 ++ ...ableAsync(SqlServer.SA.MS.LinqService).sql | 31 ++ ...NameAsync(SqlServer.SA.MS.LinqService).sql | 89 ++++ ...cTest(SqlServer.SA.MS.LinqService,100).sql | 18 + ...cTest(SqlServer.SA.MS.LinqService,200).sql | 18 + ...ecord(SqlServer.SA.MS.LinqService,100).sql | 13 + ...ecord(SqlServer.SA.MS.LinqService,200).sql | 13 + ...cTest(SqlServer.SA.MS.LinqService,100).sql | 15 + ...cTest(SqlServer.SA.MS.LinqService,200).sql | 15 + ...ecord(SqlServer.SA.MS.LinqService,100).sql | 15 + ...ecord(SqlServer.SA.MS.LinqService,200).sql | 15 + ...cTest(SqlServer.SA.MS.LinqService,100).sql | 21 + ...cTest(SqlServer.SA.MS.LinqService,200).sql | 21 + ...cTest(SqlServer.SA.MS.LinqService,100).sql | 12 + ...cTest(SqlServer.SA.MS.LinqService,200).sql | 12 + ...ecord(SqlServer.SA.MS.LinqService,100).sql | 12 + ...ecord(SqlServer.SA.MS.LinqService,200).sql | 12 + ...ert2Async(SqlServer.SA.MS.LinqService).sql | 46 ++ ...ert3Async(SqlServer.SA.MS.LinqService).sql | 48 ++ ...ert4Async(SqlServer.SA.MS.LinqService).sql | 48 ++ ...NameAsync(SqlServer.SA.MS.LinqService).sql | 69 +++ ...ace1Async(SqlServer.SA.MS.LinqService).sql | 97 ++++ ...NameAsync(SqlServer.SA.MS.LinqService).sql | 149 ++++++ ...ate3Async(SqlServer.SA.MS.LinqService).sql | 97 ++++ ...te3xAsync(SqlServer.SA.MS.LinqService).sql | 103 ++++ ...ity1Async(SqlServer.SA.MS.LinqService).sql | 14 + ...ity2Async(SqlServer.SA.MS.LinqService).sql | 14 + ...ity4Async(SqlServer.SA.MS.LinqService).sql | 32 ++ ...yncTest(SqlServer.SA.MS.LinqService,1).sql | 41 +- ...yncTest(SqlServer.SA.MS.LinqService,2).sql | 41 +- ...yncTest(SqlServer.SA.MS.LinqService,1).sql | 41 +- ...yncTest(SqlServer.SA.MS.LinqService,2).sql | 41 +- ...Async(SqlServer.SA.MS.LinqService,100).sql | 24 + ...Async(SqlServer.SA.MS.LinqService,200).sql | 24 + ...ecord(SqlServer.SA.MS.LinqService,100).sql | 24 + ...ecord(SqlServer.SA.MS.LinqService,200).sql | 24 + ...yncTest(SqlServer.SA.MS.LinqService,1).sql | 41 +- ...yncTest(SqlServer.SA.MS.LinqService,2).sql | 41 +- ...yncTest(SqlServer.SA.MS.LinqService,1).sql | 41 +- ...yncTest(SqlServer.SA.MS.LinqService,2).sql | 41 +- ...FullAsync(SqlServer.SA.MS.LinqService).sql | 54 +++ ...tionAsync(SqlServer.SA.MS.LinqService).sql | 53 ++ ...QueryAsyn(SqlServer.SA.MS.LinqService).sql | 40 ++ ...TableAsyn(SqlServer.SA.MS.LinqService).sql | 38 ++ ...te12Async(SqlServer.SA.MS.LinqService).sql | 13 + ...ate1Async(SqlServer.SA.MS.LinqService).sql | 54 +++ ...ate2Async(SqlServer.SA.MS.LinqService).sql | 54 +++ ...ate4Async(SqlServer.SA.MS.LinqService).sql | 55 +++ ...ion1Async(SqlServer.SA.MS.LinqService).sql | 41 ++ ...1AsyncOld(SqlServer.SA.MS.LinqService).sql | 41 ++ ...NameAsync(SqlServer.SA.MS.LinqService).sql | 105 ++++ ...lex1Async(SqlServer.SA.MS.LinqService).sql | 55 +++ ...TestAsync(SqlServer.SA.MS.LinqService).sql | 23 + ...TestAsync(SqlServer.SA.MS.LinqService).sql | 454 +---------------- ...gleRecord(SqlServer.SA.MS.LinqService).sql | 456 +----------------- ...TestAsync(SqlServer.SA.MS.LinqService).sql | 23 + ...TestAsync(SqlServer.SA.MS.LinqService).sql | 451 +---------------- ...ateUpdate(SqlServer.SA.MS.LinqService).sql | 450 +---------------- ...gleRecord(SqlServer.SA.MS.LinqService).sql | 452 +---------------- ...ithoutOld(SqlServer.SA.MS.LinqService).sql | 450 +---------------- ...ateUpdate(SqlServer.SA.MS.LinqService).sql | 449 +---------------- ...gleRecord(SqlServer.SA.MS.LinqService).sql | 451 +---------------- ...TestAsync(SqlServer.SA.MS.LinqService).sql | 23 + ...TestAsync(SqlServer.SA.MS.LinqService).sql | 454 +---------------- ...gleRecord(SqlServer.SA.MS.LinqService).sql | 456 +----------------- ...TestAsync(SqlServer.SA.MS.LinqService).sql | 23 + ...TestAsync(SqlServer.SA.MS.LinqService).sql | 451 +---------------- ...ateUpdate(SqlServer.SA.MS.LinqService).sql | 450 +---------------- ...gleRecord(SqlServer.SA.MS.LinqService).sql | 452 +---------------- ...ithoutOld(SqlServer.SA.MS.LinqService).sql | 450 +---------------- ...ateUpdate(SqlServer.SA.MS.LinqService).sql | 449 +---------------- ...gleRecord(SqlServer.SA.MS.LinqService).sql | 451 +---------------- ...TestAsync(SqlServer.SA.MS.LinqService).sql | 21 + ...TestAsync(SqlServer.SA.MS.LinqService).sql | 233 +-------- ...gleRecord(SqlServer.SA.MS.LinqService).sql | 233 +-------- ...TestAsync(SqlServer.SA.MS.LinqService).sql | 229 +-------- ...gleRecord(SqlServer.SA.MS.LinqService).sql | 229 +-------- ...ithoutOld(SqlServer.SA.MS.LinqService).sql | 228 +-------- ...gleRecord(SqlServer.SA.MS.LinqService).sql | 228 +-------- ...IntoAsync(SqlServer.SA.MS.LinqService).sql | 21 + ...TestAsync(SqlServer.SA.MS.LinqService).sql | 22 + ...TestAsync(SqlServer.SA.MS.LinqService).sql | 234 +-------- ...gleRecord(SqlServer.SA.MS.LinqService).sql | 234 +-------- ...TestAsync(SqlServer.SA.MS.LinqService).sql | 230 +-------- ...gleRecord(SqlServer.SA.MS.LinqService).sql | 230 +-------- ...ithoutOld(SqlServer.SA.MS.LinqService).sql | 229 +-------- ...gleRecord(SqlServer.SA.MS.LinqService).sql | 229 +-------- ...IntoAsync(SqlServer.SA.MS.LinqService).sql | 22 + ....Linq.AsyncTests.Test(SqlServer.SA.MS).sql | 18 + ...Linq.AsyncTests.Test1(SqlServer.SA.MS).sql | 9 + ...syncTests.TestForEach(SqlServer.SA.MS).sql | 9 + ...sts.Linq.AsyncTests.Test(SqlServer.SA).sql | 18 + ...ts.Linq.AsyncTests.Test1(SqlServer.SA).sql | 9 + ...q.AsyncTests.TestForEach(SqlServer.SA).sql | 9 + 624 files changed, 15972 insertions(+), 45076 deletions(-) create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.LinqService,False).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.LinqService,True).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.LinqService,False).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.LinqService,True).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.LinqService,False).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.LinqService,True).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.LinqService,False).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.LinqService,True).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.LinqService,False).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.LinqService,True).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.LinqService,False).sql create mode 100644 SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.LinqService,True).sql create mode 100644 SqlServer.Contained.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.Contained.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.MS.LinqService,False).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.MS.LinqService,True).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.MS.LinqService,False).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.MS.LinqService,True).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.MS.LinqService,False).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.MS.LinqService,True).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.MS.LinqService,False).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.MS.LinqService,True).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.MS.LinqService,False).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.MS.LinqService,True).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.MS.LinqService,False).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.MS.LinqService,True).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.Contained.MS.LinqService).sql create mode 100644 SqlServer.Contained.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.Contained.MS).sql create mode 100644 SqlServer.Contained.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.Contained.MS).sql create mode 100644 SqlServer.Contained.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.Contained.MS).sql create mode 100644 SqlServer.Contained/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.Contained).sql create mode 100644 SqlServer.Contained/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.Contained).sql create mode 100644 SqlServer.Contained/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.Contained).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.LinqService,False).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.LinqService,True).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.LinqService,False).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.LinqService,True).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.LinqService,False).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.LinqService,True).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.LinqService,False).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.LinqService,True).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.LinqService,False).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.LinqService,True).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.LinqService,False).sql create mode 100644 SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.LinqService,True).sql create mode 100644 SqlServer.SA.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.SA.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.MS.LinqService,False).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.MS.LinqService,True).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.MS.LinqService,False).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.MS.LinqService,True).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.MS.LinqService,False).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.MS.LinqService,True).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.MS.LinqService,False).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.MS.LinqService,True).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.MS.LinqService,False).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.MS.LinqService,True).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.MS.LinqService,False).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.MS.LinqService,True).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.SA.MS.LinqService).sql create mode 100644 SqlServer.SA.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.SA.MS).sql create mode 100644 SqlServer.SA.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.SA.MS).sql create mode 100644 SqlServer.SA.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.SA.MS).sql create mode 100644 SqlServer.SA/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.SA).sql create mode 100644 SqlServer.SA/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.SA).sql create mode 100644 SqlServer.SA/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.SA).sql diff --git a/SqlServer.Contained.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..9f0b70702627 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..2abda1711163 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..eacb18994f73 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.Contained.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..915108796c16 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.Contained.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..eacb18994f73 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.Contained.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..915108796c16 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.Contained.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..f883ec93abf6 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.Contained.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..1135d10a7764 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.Contained.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.Contained.LinqService).sql index 62038bf6b1af..bed6665636a4 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.Contained.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..845dd752694d --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.Contained.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..c69b1197f5e6 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.Contained.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..c69b1197f5e6 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.Contained.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..e2b12a92c78d --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.Contained.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..e2b12a92c78d --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.Contained.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..d48f3b93a98f --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.Contained.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..5fb66ccc9f06 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..5f52c2fa7a25 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.Contained.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..ea065d79028e --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.Contained.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..ea065d79028e --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.Contained.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..fd35ed10c9ca --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.Contained.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..fd35ed10c9ca --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.Contained.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..081c66737298 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.Contained.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..081c66737298 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.Contained.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.Contained.LinqService).sql index 6ae1bf086136..597259e89577 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.Contained.LinqService).sql @@ -1,161 +1,15 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.Contained.LinqService).sql index 6ae1bf086136..3a658e7c1481 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.Contained.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.Contained.LinqService).sql index 6ae1bf086136..ac6412e3a3bb 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.Contained.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.Contained.LinqService).sql index 6ae1bf086136..ac6412e3a3bb 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.Contained.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.Contained.LinqService).sql index 6ae1bf086136..3a658e7c1481 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.Contained.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.Contained.LinqService).sql index 6ae1bf086136..38c8245cfc8d 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.Contained.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.Contained.LinqService).sql index 6ae1bf086136..43220a9fb54c 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.Contained.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.Contained.LinqService).sql index 6ae1bf086136..34ed11816deb 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.Contained.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.Contained.LinqService).sql index 6ae1bf086136..34ed11816deb 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.Contained.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.Contained.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..5abb337d968b --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.Contained.LinqService).sql index ecc3104406dd..8ee515f43466 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.Contained.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.Contained SqlServer.2019 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained SqlServer.2019 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained SqlServer.2019 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained SqlServer.2019 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained SqlServer.2019 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained SqlServer.2019 diff --git a/SqlServer.Contained.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.Contained.LinqService).sql index e47cf600fc14..c8b216feb545 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.Contained.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.Contained SqlServer.2019 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained SqlServer.2019 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained SqlServer.2019 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained SqlServer.2019 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained SqlServer.2019 diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..3dbf68e2570a --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..5da28e212893 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..fefe6f946a5b --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.Contained.LinqService).sql index 398f8e748e2f..829c0a0db61a 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.Contained.LinqService).sql @@ -1,43 +1,11 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicParent] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.Contained.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.Contained.LinqService).sql index acb53a8b9d3b..4d999ad0090b 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.Contained.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.Contained SqlServer.2019 (asynchronously) diff --git a/SqlServer.Contained.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.Contained.LinqService).sql index a6c6fa500228..c178e16fd372 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.Contained.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.Contained SqlServer.2019 (asynchronously) diff --git a/SqlServer.Contained.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..d53a55789bd5 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.Contained.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..918ac21904f6 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..2e58bdeced79 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..ef2112f95766 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..a19346f0c397 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.Contained.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.LinqService,False).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.LinqService,False).sql new file mode 100644 index 000000000000..bc4dfe1acbaa --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.LinqService,True).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.LinqService,True).sql new file mode 100644 index 000000000000..bc4dfe1acbaa --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.LinqService,False).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.LinqService,False).sql new file mode 100644 index 000000000000..bc4dfe1acbaa --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.LinqService,True).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.LinqService,True).sql new file mode 100644 index 000000000000..bc4dfe1acbaa --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.Contained.LinqService).sql index 46dbb0ceee2a..19c07345edb0 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.Contained.LinqService).sql @@ -1,75 +1,13 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.LinqService,False).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.LinqService,False).sql index 0baa2906b41d..f479e17270fe 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.LinqService,False).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.LinqService,True).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.LinqService,True).sql index be7236d16d90..5d65931ac99b 100644 --- a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.LinqService,True).sql +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.LinqService,False).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.LinqService,False).sql new file mode 100644 index 000000000000..c81bce5ea655 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.LinqService,True).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.LinqService,True).sql new file mode 100644 index 000000000000..c81bce5ea655 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.LinqService,False).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.LinqService,False).sql new file mode 100644 index 000000000000..073ee3f12973 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.LinqService,True).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.LinqService,True).sql new file mode 100644 index 000000000000..bfaa831274bb --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.LinqService,False).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.LinqService,False).sql new file mode 100644 index 000000000000..c5575689ae5e --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.LinqService,True).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.LinqService,True).sql new file mode 100644 index 000000000000..16b1bd248836 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.LinqService,False).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.LinqService,False).sql new file mode 100644 index 000000000000..06433d7ec090 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.LinqService,True).sql b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.LinqService,True).sql new file mode 100644 index 000000000000..551b0dd01be0 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,False,False).sql b/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,False,False).sql index 254e2fe26fac..a73bfb5d6ea2 100644 --- a/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,False,False).sql +++ b/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,False,True).sql b/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,False,True).sql index e6719cc2a0cc..3944a8c4f663 100644 --- a/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,False,True).sql +++ b/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,False,True).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,True,False).sql b/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,True,False).sql index 68c20ebf2feb..224fd56c18b7 100644 --- a/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,True,False).sql +++ b/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,True,False).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +CREATE TABLE [TestDataContained]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,True,True).sql b/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,True,True).sql index 230b9cc478a2..c969cd93c619 100644 --- a/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,True,True).sql +++ b/SqlServer.Contained.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.LinqService,False,True,True).sql @@ -19,3 +19,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +CREATE TABLE [TestDataContained].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..fb803d07494d --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.Contained.LinqService).sql index d8d231bf7226..0ae74c16454d 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.Contained.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.Contained SqlServer.2019 SELECT @@ -7,3 +33,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..1c2236b7a0b7 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.Contained.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.LinqService,100).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.LinqService,100).sql index 013c864e1c72..247f7adfefa3 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.LinqService,100).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.LinqService,100).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.LinqService,200).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.LinqService,200).sql index 013c864e1c72..247f7adfefa3 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.LinqService,200).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.LinqService,200).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.LinqService,100).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.LinqService,100).sql index 555304079d68..02a1f4f8e6a5 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.LinqService,100).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.LinqService,200).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.LinqService,200).sql index 555304079d68..02a1f4f8e6a5 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.LinqService,200).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.LinqService,100).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.LinqService,100).sql index 013c864e1c72..1f152e8b42b2 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.LinqService,100).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.LinqService,200).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.LinqService,200).sql index 013c864e1c72..1ebd7ae2e9bf 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.LinqService,200).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,100).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,100).sql index 555304079d68..b4d19087868e 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,100).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,200).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,200).sql index 555304079d68..d98c63b30949 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,200).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.LinqService,100).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.LinqService,100).sql index 3acd65791cf0..5843a7d30ec6 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.LinqService,100).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.Contained SqlServer.2019 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.LinqService,200).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.LinqService,200).sql index 3acd65791cf0..a79a46fb3ef6 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.LinqService,200).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.Contained SqlServer.2019 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.LinqService,100).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.LinqService,100).sql index 013c864e1c72..bffd2cd56498 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.LinqService,100).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.LinqService,200).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.LinqService,200).sql index 013c864e1c72..bffd2cd56498 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.LinqService,200).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,100).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,100).sql index 555304079d68..c7fca75dead1 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,100).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,200).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,200).sql index 555304079d68..c7fca75dead1 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,200).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..f3e84e016dee --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..24f3a737b5cb --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..24f3a737b5cb --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.Contained.LinqService).sql index 65e7ea8f2beb..235fd6504ddb 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.Contained.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.Contained SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,32 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.Contained.LinqService).sql index c8c2761883fa..50eca37c3e28 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.Contained.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..9809270127ec --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.Contained.LinqService).sql @@ -0,0 +1,149 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.Contained.LinqService).sql index c8c2761883fa..62939c00df4b 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.Contained.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.Contained.LinqService).sql index c8c2761883fa..7adfb52c4a48 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.Contained.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.Contained.LinqService).sql index 7fa512945b67..67c9c19f38ca 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.Contained.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.Contained SqlServer.2019 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.Contained.LinqService).sql index 7fa512945b67..67c9c19f38ca 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.Contained.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.Contained SqlServer.2019 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.Contained.LinqService).sql index 05ee77822627..612c8c69c74d 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.Contained.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.Contained SqlServer.2019 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.Contained SqlServer.2019 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.LinqService,1).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.LinqService,1).sql index 38f79987a30f..629baa48f1ca 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.LinqService,1).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.LinqService,2).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.LinqService,2).sql index 38f79987a30f..a77653120245 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.LinqService,2).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,1).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,1).sql index 38f79987a30f..77302b667d7e 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,1).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,2).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,2).sql index 38f79987a30f..4b4da40fdde6 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,2).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.LinqService,100).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.LinqService,100).sql index 480130263a75..2228aeffd6a8 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.LinqService,100).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.Contained SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.LinqService,200).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.LinqService,200).sql index 290ced63ab27..d0ebabc6ac71 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.LinqService,200).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.Contained SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.LinqService,100).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.LinqService,100).sql index 89f7fe421cfa..c05a0da94890 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.LinqService,100).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.Contained SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.LinqService,200).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.LinqService,200).sql index 0b68584823f2..59f5aac63688 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.LinqService,200).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.Contained SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.LinqService,1).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.LinqService,1).sql index 38f79987a30f..e76b3e9f3d0e 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.LinqService,1).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.LinqService,2).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.LinqService,2).sql index 38f79987a30f..f6dc6a517e97 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.LinqService,2).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,1).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,1).sql index 38f79987a30f..77302b667d7e 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,1).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,2).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,2).sql index 38f79987a30f..4b4da40fdde6 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,2).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.Contained.LinqService).sql index 445bc01973f7..315ff5e35820 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.Contained.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.Contained.LinqService).sql index 445bc01973f7..e0b382b14eff 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.Contained.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.Contained.LinqService).sql index 4a3f2ffc982a..b97b247ad95e 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.Contained.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.Contained SqlServer.2019 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.Contained.LinqService).sql index 4a3f2ffc982a..ca14ce79eb65 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.Contained.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.Contained SqlServer.2019 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..3c30fdfc9819 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..ce688deace30 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..ce688deace30 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..04f2e5b96820 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..a98a586a1b16 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.Contained.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..a98a586a1b16 --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.Contained.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.Contained.LinqService).sql new file mode 100644 index 000000000000..4fd4070da86f --- /dev/null +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.Contained.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.Contained.LinqService).sql index 14cd0e6e12a1..712e6572fe72 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.Contained.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql index de2a77ef72fd..5de591a0a55d 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.Contained SqlServer.2019 SELECT diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql index 525e68c442ba..882253130301 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql index 525e68c442ba..0a442dfb3d12 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.Contained.LinqService).sql index f42b0757c215..eca09f6db0ae 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.Contained.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.Contained SqlServer.2019 SELECT diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql index 525e68c442ba..72a4ced1eaa6 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.LinqService).sql index 525e68c442ba..86de28d97586 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql index 525e68c442ba..f2a8d538a4ef 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql index 525e68c442ba..b8f35d7ffa5b 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.LinqService).sql index 525e68c442ba..de6a8be39a53 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql index 525e68c442ba..8b3c114ba555 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql index de2a77ef72fd..5de591a0a55d 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.Contained SqlServer.2019 SELECT diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql index 525e68c442ba..882253130301 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql index 525e68c442ba..0a442dfb3d12 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.Contained.LinqService).sql index f42b0757c215..eca09f6db0ae 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.Contained.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.Contained SqlServer.2019 SELECT diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql index 525e68c442ba..72a4ced1eaa6 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.LinqService).sql index 525e68c442ba..86de28d97586 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql index 525e68c442ba..f2a8d538a4ef 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql index 525e68c442ba..b8f35d7ffa5b 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.LinqService).sql index 525e68c442ba..de6a8be39a53 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql index 525e68c442ba..8b3c114ba555 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql index 6910cc5a2a98..b494e72521b5 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.Contained SqlServer.2019 SELECT diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql index 516cef5bbf5f..800550666841 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql index 516cef5bbf5f..6500d99b39dc 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql index 516cef5bbf5f..310b6d0c0dbf 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql index 516cef5bbf5f..41267ff17568 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql index 516cef5bbf5f..b138198f0617 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.LinqService).sql index 516cef5bbf5f..83afc9e3aee3 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.Contained.LinqService).sql index 6910cc5a2a98..5adb15f2eb13 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.Contained.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.Contained SqlServer.2019 SELECT diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql index 6910cc5a2a98..7d2f15251a4b 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.Contained.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.Contained SqlServer.2019 SELECT diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql index 516cef5bbf5f..0a4e1fbee09d 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.Contained.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql index 516cef5bbf5f..d4e5c3164bbf 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql index 516cef5bbf5f..0ca9779f57af 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.Contained.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql index 516cef5bbf5f..c0d6d2cdd450 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql index 516cef5bbf5f..fb2b5710bfa6 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.LinqService).sql index 516cef5bbf5f..17254c6a9e61 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.Contained.LinqService).sql b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.Contained.LinqService).sql index 6910cc5a2a98..571434044dea 100644 --- a/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.Contained.LinqService).sql +++ b/SqlServer.Contained.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.Contained.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.Contained SqlServer.2019 SELECT diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..9b47542c5aec --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..c735d63e8354 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..591c8318c46b --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..c3dae0fd5966 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..591c8318c46b --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..c3dae0fd5966 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..28106d173550 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..a0082923f9f1 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.Contained.MS.LinqService).sql index cc39568d77ef..5fb7c21f4dce 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.Contained.MS.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..7e394880565f --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..9b2793d318ab --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..9b2793d318ab --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..3d502f85528e --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..3d502f85528e --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..7a44eac177ac --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..0f216fb562a4 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..ce6af80bfeb8 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..c96f01aaac1e --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..c96f01aaac1e --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..deb975068a34 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..deb975068a34 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..edd23b595883 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..edd23b595883 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.Contained.MS.LinqService).sql index cbe5c22a3614..f17b7995c6d4 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,161 +1,15 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.Contained.MS.LinqService).sql index cbe5c22a3614..bea5197a1630 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.Contained.MS.LinqService).sql index cbe5c22a3614..69d715d8c6dd 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.Contained.MS.LinqService).sql index cbe5c22a3614..69d715d8c6dd 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.Contained.MS.LinqService).sql index cbe5c22a3614..bea5197a1630 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.Contained.MS.LinqService).sql index cbe5c22a3614..31716a8bfcf1 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.Contained.MS.LinqService).sql index cbe5c22a3614..cb957dd1f043 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.Contained.MS.LinqService).sql index cbe5c22a3614..b6bf48d56852 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.Contained.MS.LinqService).sql index cbe5c22a3614..b6bf48d56852 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..6af693c95cf8 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.Contained.MS.LinqService).sql index 2d4473ee2c37..a9fe1636bfcf 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.Contained.MS.LinqService).sql index f00f78851307..ccb6ae352831 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..bdd7079a2645 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..b73285fa244d --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..a89537a15c51 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.Contained.MS.LinqService).sql index 9d2276b9ef07..abc8fc64b76a 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.Contained.MS.LinqService).sql @@ -1,43 +1,11 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicParent] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.Contained.MS.LinqService).sql index 2b967cb43261..6ccb588d146e 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.Contained.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 (asynchronously) diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.Contained.MS.LinqService).sql index 77bb2fd7f8ed..227d37203f7c 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.Contained.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 (asynchronously) diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..5dfbb1ca85d2 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..7bd2c13baafe --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..dc94d07941ed --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..733871d2129d --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..e02696e84f07 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.MS.LinqService,False).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.MS.LinqService,False).sql new file mode 100644 index 000000000000..9618c42a7dea --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.MS.LinqService,True).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.MS.LinqService,True).sql new file mode 100644 index 000000000000..9618c42a7dea --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.Contained.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.MS.LinqService,False).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.MS.LinqService,False).sql new file mode 100644 index 000000000000..9618c42a7dea --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.MS.LinqService,True).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.MS.LinqService,True).sql new file mode 100644 index 000000000000..9618c42a7dea --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.Contained.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.Contained.MS.LinqService).sql index a9901c5876e0..7913fcc1dd81 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.Contained.MS.LinqService).sql @@ -1,75 +1,13 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.MS.LinqService,False).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.MS.LinqService,False).sql index 006b745e7d06..22fc8652565e 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.MS.LinqService,False).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.MS.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.MS.LinqService,True).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.MS.LinqService,True).sql index fabc4eafb632..186daf8381a1 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.MS.LinqService,True).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.Contained.MS.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.MS.LinqService,False).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.MS.LinqService,False).sql new file mode 100644 index 000000000000..edb42d7ce38b --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.MS.LinqService,True).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.MS.LinqService,True).sql new file mode 100644 index 000000000000..edb42d7ce38b --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.Contained.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.MS.LinqService,False).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.MS.LinqService,False).sql new file mode 100644 index 000000000000..f88ffe54af5a --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.MS.LinqService,True).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.MS.LinqService,True).sql new file mode 100644 index 000000000000..786cb34c7a73 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.Contained.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.MS.LinqService,False).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.MS.LinqService,False).sql new file mode 100644 index 000000000000..8085126fb576 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.MS.LinqService,True).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.MS.LinqService,True).sql new file mode 100644 index 000000000000..10a2de87fe60 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.Contained.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.MS.LinqService,False).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.MS.LinqService,False).sql new file mode 100644 index 000000000000..149474983a90 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.MS.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.MS.LinqService,True).sql b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.MS.LinqService,True).sql new file mode 100644 index 000000000000..0fccca91f6b5 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.Contained.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,False,False).sql b/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,False,False).sql index 3de57dc1970a..9b5ee7104833 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,False,False).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,False,True).sql b/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,False,True).sql index 61c53c5c72a5..1838a774b8e6 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,False,True).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,False,True).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,True,False).sql b/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,True,False).sql index 23548eb63e71..fb2ff832c2ce 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,True,False).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,True,False).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [TestDataMSContained]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,True,True).sql b/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,True,True).sql index 918292ca8194..02dbbcae3eb4 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,True,True).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.Contained.MS.LinqService,False,True,True).sql @@ -19,3 +19,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [TestDataMSContained].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..a63a4b60e786 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.Contained.MS.LinqService).sql index e90a9ceaa20d..31deddddd3a7 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 SELECT @@ -7,3 +33,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..6eb4775db78a --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.MS.LinqService,100).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.MS.LinqService,100).sql index f654290611ec..30f3c767cc7c 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.MS.LinqService,100).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.MS.LinqService,100).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.MS.LinqService,200).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.MS.LinqService,200).sql index f654290611ec..30f3c767cc7c 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.MS.LinqService,200).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.Contained.MS.LinqService,200).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,100).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,100).sql index 9b1ea1bfea4e..989c91dc8431 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,100).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,200).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,200).sql index 9b1ea1bfea4e..989c91dc8431 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,200).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,100).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,100).sql index f654290611ec..e5acb44ea335 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,100).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,200).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,200).sql index f654290611ec..680538fd9f49 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,200).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,100).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,100).sql index 9b1ea1bfea4e..d37e27048a34 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,100).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,200).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,200).sql index 9b1ea1bfea4e..c9023e6a8d79 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,200).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,100).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,100).sql index fd4805e0550a..b492a188b9d0 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,100).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,200).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,200).sql index fd4805e0550a..648ea9bbe89d 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,200).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,100).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,100).sql index f654290611ec..5836114c1bcf 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,100).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,200).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,200).sql index f654290611ec..5836114c1bcf 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,200).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.Contained.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,100).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,100).sql index 9b1ea1bfea4e..22bcb2bfb8f8 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,100).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,200).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,200).sql index 9b1ea1bfea4e..22bcb2bfb8f8 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,200).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.Contained.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..340231813e37 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..2d85926ea273 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..2d85926ea273 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.Contained.MS.LinqService).sql index 5350cc588010..d31c06dd4186 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,32 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.Contained.MS.LinqService).sql index d8f54f23be1e..de78401a4540 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.Contained.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..33a72e364c3b --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,149 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.Contained.MS.LinqService).sql index d8f54f23be1e..7266614af8f8 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.Contained.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.Contained.MS.LinqService).sql index d8f54f23be1e..2bbd99a986ec 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.Contained.MS.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.Contained.MS.LinqService).sql index 9f9d04ad7870..76e76365d1a2 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.Contained.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.Contained.MS.LinqService).sql index 9f9d04ad7870..76e76365d1a2 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.Contained.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.Contained.MS.LinqService).sql index 1979b6233ce1..addf383343e0 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.Contained.MS.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,1).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,1).sql index efb03d1450db..98dae6fc6d0c 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,1).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,2).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,2).sql index efb03d1450db..b5b81c43118a 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,2).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,1).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,1).sql index efb03d1450db..9738a2eea8d2 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,1).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,2).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,2).sql index efb03d1450db..558d61871422 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,2).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.MS.LinqService,100).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.MS.LinqService,100).sql index 9b583098ed58..d4a510f78243 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.MS.LinqService,100).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.MS.LinqService,200).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.MS.LinqService,200).sql index e9c0c2fa76af..f8587fdcbbb6 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.MS.LinqService,200).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.Contained.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService,100).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService,100).sql index b576b6e940ed..f896b957fc86 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService,100).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService,200).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService,200).sql index 59e9fefa31a0..142c0c8942aa 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService,200).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,1).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,1).sql index efb03d1450db..bdd4cff75e82 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,1).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,2).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,2).sql index efb03d1450db..3b8c352bf5c7 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,2).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.Contained.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,1).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,1).sql index efb03d1450db..9738a2eea8d2 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,1).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,2).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,2).sql index efb03d1450db..558d61871422 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,2).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.Contained.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.Contained.MS.LinqService).sql index 846af8667cf0..2a625c0b0372 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.Contained.MS.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.Contained.MS.LinqService).sql index 846af8667cf0..01b51cc5a6d7 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.Contained.MS.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.Contained.MS.LinqService).sql index 5bad94d069e1..cf388d24c3c4 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.Contained.MS.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.Contained.MS.LinqService).sql index 5bad94d069e1..a6833357b6f8 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.Contained.MS.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..eaac5688fca8 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..ac4ab35458a5 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..ac4ab35458a5 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..5c1d96a890af --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..c802718ef5cc --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..c802718ef5cc --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.Contained.MS.LinqService).sql new file mode 100644 index 000000000000..adf6055f40f0 --- /dev/null +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.Contained.MS.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.Contained.MS.LinqService).sql index 7a26de912b4c..365e2b4cfc15 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.Contained.MS.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql index a183cfc04c78..5e5f4059ca4f 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 SELECT diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..9be7c66b361c 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..a50b5cf75bf6 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql index 14b366f6df61..27e88d3b7b92 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 SELECT diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..a189934653c1 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..298159424864 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..4b0aacc628f5 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..9e1f558fd80b 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..4939e8f251c9 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..0ec7e6bf8cbf 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql index a183cfc04c78..5e5f4059ca4f 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 SELECT diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..9be7c66b361c 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..a50b5cf75bf6 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql index 14b366f6df61..27e88d3b7b92 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 SELECT diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..a189934653c1 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..298159424864 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..4b0aacc628f5 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..9e1f558fd80b 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..4939e8f251c9 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql index 4fe23950483f..0ec7e6bf8cbf 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.Contained.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql index bd39f62506e3..9b31ad032aab 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 SELECT diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql index 474bbb2bb773..cc5b7bbc7bf6 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql index 474bbb2bb773..6a734e6e64ac 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql index 474bbb2bb773..8ddb5550fa78 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql index 474bbb2bb773..4282a581f5a7 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql index 474bbb2bb773..58e4234ed0fd 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.MS.LinqService).sql index 474bbb2bb773..850c3a475821 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.MS.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.Contained.MS.LinqService).sql index bd39f62506e3..1191b3c1083f 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 SELECT diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql index bd39f62506e3..3213ec8532ec 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 SELECT diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql index 474bbb2bb773..fbc0eaac9aaf 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql index 474bbb2bb773..ef495acd1331 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql index 474bbb2bb773..110940846881 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql index 474bbb2bb773..d0931607cbd3 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.Contained.MS.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql index 474bbb2bb773..c84e2404c77a 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.Contained.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.MS.LinqService).sql index 474bbb2bb773..dcbc3b43ebda 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.Contained.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.Contained.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.Contained.MS.LinqService).sql b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.Contained.MS.LinqService).sql index bd39f62506e3..60691ecb9816 100644 --- a/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.Contained.MS.LinqService).sql +++ b/SqlServer.Contained.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.Contained.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.Contained.MS SqlServer.2019 SELECT diff --git a/SqlServer.Contained.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.Contained.MS).sql new file mode 100644 index 000000000000..aa3aa0f65eb2 --- /dev/null +++ b/SqlServer.Contained.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.Contained.MS).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.Contained.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.Contained.MS).sql new file mode 100644 index 000000000000..591c8318c46b --- /dev/null +++ b/SqlServer.Contained.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.Contained.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.Contained.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.Contained.MS).sql new file mode 100644 index 000000000000..591c8318c46b --- /dev/null +++ b/SqlServer.Contained.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.Contained.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.Contained.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.Contained/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.Contained).sql b/SqlServer.Contained/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.Contained).sql new file mode 100644 index 000000000000..d1d4f36ec151 --- /dev/null +++ b/SqlServer.Contained/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.Contained).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.Contained/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.Contained).sql b/SqlServer.Contained/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.Contained).sql new file mode 100644 index 000000000000..eacb18994f73 --- /dev/null +++ b/SqlServer.Contained/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.Contained).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.Contained/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.Contained).sql b/SqlServer.Contained/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.Contained).sql new file mode 100644 index 000000000000..eacb18994f73 --- /dev/null +++ b/SqlServer.Contained/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.Contained).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.Contained SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..b27f3d5528ae --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.SA.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..76818da51048 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..8973528e4b84 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.SA.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..61506c1af366 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.SA.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..8973528e4b84 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.SA.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..61506c1af366 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.SA.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..a9c957315ed1 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.SA.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..8ea59856e839 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.SA.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.SA.LinqService).sql index 859788583009..2c2da33b5cb3 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.SA.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..867b71150760 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.SA.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..f8397a954517 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.SA.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..f8397a954517 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.SA.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..d6ff76f6ccef --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.SA.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..d6ff76f6ccef --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.SA.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..4fd4c77951e5 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.SA.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..ea831f794f08 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..dcf02b86eff2 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.SA.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..23595e5666b4 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.SA.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..23595e5666b4 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.SA.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..fd0a0f33545f --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.SA.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..fd0a0f33545f --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.SA.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..fb9e08767176 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.SA.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..fb9e08767176 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.SA.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.SA.LinqService).sql index e7565330e625..c04cd9b4c8b0 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.SA.LinqService).sql @@ -1,161 +1,15 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.SA.LinqService).sql index e7565330e625..58e865032fa8 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.SA.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.SA.LinqService).sql index e7565330e625..861648d8e78f 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.SA.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.SA.LinqService).sql index e7565330e625..861648d8e78f 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.SA.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.SA.LinqService).sql index e7565330e625..58e865032fa8 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.SA.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.SA.LinqService).sql index e7565330e625..548557700ca6 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.SA.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.SA.LinqService).sql index e7565330e625..96e112097adc 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.SA.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.SA.LinqService).sql index e7565330e625..d404f72f6f49 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.SA.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.SA.LinqService).sql index e7565330e625..d404f72f6f49 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.SA.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.SA.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..299bd1608258 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.SA.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.SA.LinqService).sql index b9fa26c36f17..11a22680424f 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.SA.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.SA SqlServer.2019 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA SqlServer.2019 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA SqlServer.2019 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA SqlServer.2019 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA SqlServer.2019 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA SqlServer.2019 diff --git a/SqlServer.SA.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.SA.LinqService).sql index bed2794c8386..2a9e76bafc25 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.SA.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.SA SqlServer.2019 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA SqlServer.2019 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA SqlServer.2019 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA SqlServer.2019 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA SqlServer.2019 diff --git a/SqlServer.SA.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..d6cc8ae250f5 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..1cf3700e538e --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.SA.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..e9d7418c3632 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.SA.LinqService).sql index 334a720e9f5d..abb020df7fe4 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.SA.LinqService).sql @@ -1,43 +1,11 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicParent] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.SA.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.SA.LinqService).sql index 812d019e3612..55549375c049 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.SA.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.SA SqlServer.2019 (asynchronously) diff --git a/SqlServer.SA.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.SA.LinqService).sql index dd507359e60a..1d86c6f97b7e 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.SA.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.SA SqlServer.2019 (asynchronously) diff --git a/SqlServer.SA.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..9aa4a0dd4dff --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.SA.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..3804fee0d1b9 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.SA.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..19c82956e8b4 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.SA.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..d7a54631d244 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.SA.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..a0d5d1e41160 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.SA.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.LinqService,False).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.LinqService,False).sql new file mode 100644 index 000000000000..824df2a7eab5 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.LinqService,True).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.LinqService,True).sql new file mode 100644 index 000000000000..824df2a7eab5 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.LinqService,False).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.LinqService,False).sql new file mode 100644 index 000000000000..824df2a7eab5 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.LinqService,True).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.LinqService,True).sql new file mode 100644 index 000000000000..824df2a7eab5 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.SA.LinqService).sql index 8f0ec9c77bf1..458cc3fec72c 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.SA.LinqService).sql @@ -1,75 +1,13 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.LinqService,False).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.LinqService,False).sql index e5102ba5a6e5..7d6c7066b426 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.LinqService,False).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.LinqService,True).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.LinqService,True).sql index fd774a218436..344a2a4cdcfc 100644 --- a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.LinqService,True).sql +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.LinqService,False).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.LinqService,False).sql new file mode 100644 index 000000000000..b6ad8b424cb9 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.LinqService,True).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.LinqService,True).sql new file mode 100644 index 000000000000..b6ad8b424cb9 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.LinqService,False).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.LinqService,False).sql new file mode 100644 index 000000000000..a9a478623683 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.LinqService,True).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.LinqService,True).sql new file mode 100644 index 000000000000..1bf54f1679d0 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.LinqService,False).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.LinqService,False).sql new file mode 100644 index 000000000000..fbd52543f823 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.LinqService,True).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.LinqService,True).sql new file mode 100644 index 000000000000..a55cd5a2c6a8 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.LinqService,False).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.LinqService,False).sql new file mode 100644 index 000000000000..ef32e6a0a2c8 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.LinqService,True).sql b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.LinqService,True).sql new file mode 100644 index 000000000000..07a98cb58d3c --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,False,False).sql b/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,False,False).sql index cfe353e8d343..1e59ab9c0bc1 100644 --- a/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,False,False).sql +++ b/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,False,True).sql b/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,False,True).sql index 1600fef039ba..501b8e195887 100644 --- a/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,False,True).sql +++ b/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,False,True).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,True,False).sql b/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,True,False).sql index b4f188844710..a4853d7311f1 100644 --- a/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,True,False).sql +++ b/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,True,False).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +CREATE TABLE [TestDataSA]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,True,True).sql b/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,True,True).sql index f917f0a925c7..2a056df775f5 100644 --- a/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,True,True).sql +++ b/SqlServer.SA.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.LinqService,False,True,True).sql @@ -19,3 +19,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +CREATE TABLE [TestDataSA].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..69b20382d720 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.SA.LinqService).sql index 72f103a8fd92..fd73b75f6f00 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.SA.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.SA SqlServer.2019 SELECT @@ -7,3 +33,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..1f15ef225379 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.SA.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.LinqService,100).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.LinqService,100).sql index 7ab3ab07bd77..ee809caf3641 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.LinqService,100).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.LinqService,100).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.LinqService,200).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.LinqService,200).sql index 7ab3ab07bd77..ee809caf3641 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.LinqService,200).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.LinqService,200).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.LinqService,100).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.LinqService,100).sql index 1c587d1b743b..87814af76191 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.LinqService,100).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.LinqService,200).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.LinqService,200).sql index 1c587d1b743b..87814af76191 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.LinqService,200).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.LinqService,100).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.LinqService,100).sql index 7ab3ab07bd77..c373b66c9543 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.LinqService,100).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.LinqService,200).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.LinqService,200).sql index 7ab3ab07bd77..08157cde3d44 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.LinqService,200).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,100).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,100).sql index 1c587d1b743b..fd1b86e24102 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,100).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,200).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,200).sql index 1c587d1b743b..49400fe3caaa 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,200).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.LinqService,100).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.LinqService,100).sql index ddb2a393cf73..e543094922e1 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.LinqService,100).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.SA SqlServer.2019 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.LinqService,200).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.LinqService,200).sql index ddb2a393cf73..35a9f1e979c2 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.LinqService,200).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.SA SqlServer.2019 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.LinqService,100).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.LinqService,100).sql index 7ab3ab07bd77..2ffabb7c0b9a 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.LinqService,100).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.LinqService,200).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.LinqService,200).sql index 7ab3ab07bd77..2ffabb7c0b9a 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.LinqService,200).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,100).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,100).sql index 1c587d1b743b..1800dc347bad 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,100).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,200).sql b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,200).sql index 1c587d1b743b..1800dc347bad 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,200).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..1e935a7ea708 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..067c9787a642 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..067c9787a642 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.SA.LinqService).sql index f3de062efd06..aec37037de19 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.SA.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.SA SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,32 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.SA.LinqService).sql index 17fcd1639eef..0bfad79f7713 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.SA.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..d1cf0c2d943e --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.SA.LinqService).sql @@ -0,0 +1,149 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.SA.LinqService).sql index 17fcd1639eef..c4bd498f0b23 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.SA.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.SA.LinqService).sql index 17fcd1639eef..d127a94ccdc1 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.SA.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.SA.LinqService).sql index eb344c5ccd23..a63ce5f60092 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.SA.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.SA SqlServer.2019 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.SA.LinqService).sql index eb344c5ccd23..a63ce5f60092 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.SA.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.SA SqlServer.2019 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.SA.LinqService).sql index 5d25062c94af..32eb42c47a84 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.SA.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.SA SqlServer.2019 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.SA SqlServer.2019 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.LinqService,1).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.LinqService,1).sql index 13b9a2aef049..9fa44898ef5a 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.LinqService,1).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.LinqService,2).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.LinqService,2).sql index 13b9a2aef049..ca6c6614195f 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.LinqService,2).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,1).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,1).sql index 13b9a2aef049..8be3d47815e4 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,1).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,2).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,2).sql index 13b9a2aef049..5e4948947a90 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,2).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.LinqService,100).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.LinqService,100).sql index 56c5ec6185d8..533720829d51 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.LinqService,100).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.SA SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.LinqService,200).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.LinqService,200).sql index 07ebe78ff576..11ec2d375366 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.LinqService,200).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.SA SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.LinqService,100).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.LinqService,100).sql index 478335df3c17..69f4e231efb4 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.LinqService,100).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.SA SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.LinqService,200).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.LinqService,200).sql index 6c54ebab16d5..029ad098946e 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.LinqService,200).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.SA SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.LinqService,1).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.LinqService,1).sql index 13b9a2aef049..8a6da0a9edc1 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.LinqService,1).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.LinqService,2).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.LinqService,2).sql index 13b9a2aef049..d95ec60987c0 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.LinqService,2).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,1).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,1).sql index 13b9a2aef049..8be3d47815e4 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,1).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,2).sql b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,2).sql index 13b9a2aef049..5e4948947a90 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,2).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.SA.LinqService).sql index a05f0685b41c..d937cb490b09 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.SA.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.SA.LinqService).sql index a05f0685b41c..f0da8a3bc3f0 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.SA.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.SA.LinqService).sql index e5f8fd1ff79a..bb7604a8252c 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.SA.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.SA SqlServer.2019 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.SA.LinqService).sql index e5f8fd1ff79a..9f5c51293b87 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.SA.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.SA SqlServer.2019 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..1d9e71e00251 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..273bfa93c7e5 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..273bfa93c7e5 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..22973f097689 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..1bca7332c372 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.SA.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..1bca7332c372 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.SA.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.SA.LinqService).sql new file mode 100644 index 000000000000..fd03fc503b72 --- /dev/null +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.SA.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.SA.LinqService).sql index 112c5ef40bde..0d5b4a1c9a7c 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.SA.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql index 9a06b9b934f5..61b514589769 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.SA SqlServer.2019 SELECT diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql index dc632ee214e8..6d83d1ec2263 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql index dc632ee214e8..e5dd0ff73f72 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.SA.LinqService).sql index d109dc365246..372aa4c23b92 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.SA.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.SA SqlServer.2019 SELECT diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql index dc632ee214e8..0a093be9c893 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.LinqService).sql index dc632ee214e8..aacc76f15058 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql index dc632ee214e8..fefb624185b2 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql index dc632ee214e8..25922cd246d5 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.LinqService).sql index dc632ee214e8..d5bfec152dc5 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql index dc632ee214e8..cccd28f9b1cb 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql index 9a06b9b934f5..61b514589769 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.SA SqlServer.2019 SELECT diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql index dc632ee214e8..6d83d1ec2263 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql index dc632ee214e8..e5dd0ff73f72 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.SA.LinqService).sql index d109dc365246..372aa4c23b92 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.SA.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.SA SqlServer.2019 SELECT diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql index dc632ee214e8..0a093be9c893 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.LinqService).sql index dc632ee214e8..aacc76f15058 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql index dc632ee214e8..fefb624185b2 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql index dc632ee214e8..25922cd246d5 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.LinqService).sql index dc632ee214e8..d5bfec152dc5 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql index dc632ee214e8..cccd28f9b1cb 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql index c4c769ecbb2e..c5b4a32ce649 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.SA SqlServer.2019 SELECT diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql index cab8e2c67b45..3880dd5908f5 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql index cab8e2c67b45..1770298cd28e 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql index cab8e2c67b45..7129651a3a69 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql index cab8e2c67b45..13cf6fb72304 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql index cab8e2c67b45..04f14d7d68c9 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.LinqService).sql index cab8e2c67b45..e8a6f4cf1936 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.SA.LinqService).sql index c4c769ecbb2e..2ffec3ea3446 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.SA.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.SA SqlServer.2019 SELECT diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql index c4c769ecbb2e..e8890ea49de8 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.SA.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.SA SqlServer.2019 SELECT diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql index cab8e2c67b45..8e86d74be1bb 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.SA.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql index cab8e2c67b45..1e3c47a11f02 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql index cab8e2c67b45..f4dda1f9a40d 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.SA.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql index cab8e2c67b45..4e740cb8fec9 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql index cab8e2c67b45..57ed8d83a2d3 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.LinqService).sql index cab8e2c67b45..4a3c7a28cfb0 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.SA.LinqService).sql b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.SA.LinqService).sql index c4c769ecbb2e..f336cdc754cc 100644 --- a/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.SA.LinqService).sql +++ b/SqlServer.SA.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.SA.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.SA SqlServer.2019 SELECT diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..25948476b636 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + IIF(NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ), 1, 0) + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..b9c571e41642 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..2565be5c5cda --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..ff88a1531f73 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..2565be5c5cda --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..ff88a1531f73 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..1190974ed0c3 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + IIF(@ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ), 1, 0) + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..2ae4162922ef --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.SA.MS.LinqService).sql index 062a68c46e89..497bb38ea06e 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SqlServer.SA.MS.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 1 +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +OFFSET @skip ROWS FETCH NEXT @take ROWS ONLY + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..de87192526b4 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p_1 Int -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Int -- Int32 +SET @p_2 = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP (1) + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..4424fe2f659f --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..4424fe2f659f --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..8b439da8eb69 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..8b439da8eb69 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ), 1, 0) + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..c8e9c897e0d6 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..4edcf2a8de03 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (@p) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..65cc6d95e3fe --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + IIF(@p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ), 1, 0) + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..638262030bbf --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..638262030bbf --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..706e3fb45f8c --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..706e3fb45f8c --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..aab81d51c5ab --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..aab81d51c5ab --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.SA.MS.LinqService).sql index 153518357082..f2676a8f24a2 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SqlServer.SA.MS.LinqService).sql @@ -1,161 +1,15 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + IIF(EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ), 1, 0) diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.SA.MS.LinqService).sql index 153518357082..adbff4cfde78 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SqlServer.SA.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.SA.MS.LinqService).sql index 153518357082..f686c0f44b16 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SqlServer.SA.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.SA.MS.LinqService).sql index 153518357082..f686c0f44b16 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SqlServer.SA.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (1) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.SA.MS.LinqService).sql index 153518357082..adbff4cfde78 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SqlServer.SA.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.SA.MS.LinqService).sql index 153518357082..0fe71465d967 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SqlServer.SA.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.SA.MS.LinqService).sql index 153518357082..ea2a4858e0da 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SqlServer.SA.MS.LinqService).sql @@ -1,161 +1,12 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.SA.MS.LinqService).sql index 153518357082..1cf73f899df8 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SqlServer.SA.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.SA.MS.LinqService).sql index 153518357082..1cf73f899df8 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SqlServer.SA.MS.LinqService).sql @@ -1,161 +1,13 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[AsyncDataTable]', N'U') IS NULL) - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP (2) + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..73c36dd3afac --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.SA.MS.LinqService).sql index 10f67cd04713..ee0b361ef045 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SqlServer.SA.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE [obj] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.SA.MS.LinqService).sql index 450ebc9e4b1f..0541d0c909f3 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SqlServer.SA.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Value NVarChar(4000) -- String +SET @Value = N'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE [r] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..28d1052ddddd --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..c534bfc5cfd9 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..c04f2a517218 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + MAX([t1].[COUNT_1]) +FROM + [Parent] [t2] + OUTER APPLY ( + SELECT + COUNT(*) as [COUNT_1] + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t2].[ParentID] + ) [t1] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.SA.MS.LinqService).sql index ddc6bcb4859c..7d00b244a641 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SqlServer.SA.MS.LinqService).sql @@ -1,43 +1,11 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DynamicParent]', N'U') IS NULL) - CREATE TABLE [DynamicParent] - ( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DynamicChild]', N'U') IS NULL) - CREATE TABLE [DynamicChild] - ( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DynamicParent] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.SA.MS.LinqService).sql index 0bb40b00d840..67fcd1e13669 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SqlServer.SA.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SqlServer.SA.MS SqlServer.2019 (asynchronously) diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.SA.MS.LinqService).sql index aaf36c199bdf..abf6a5bdea1c 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SqlServer.SA.MS.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP (1) + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT TOP (1) + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- SqlServer.SA.MS SqlServer.2019 (asynchronously) diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..850634e0c038 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..350ad02598de --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..6532f9fe48a6 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = N'F' + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..978875af0ac8 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + 1 + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..8285fbeb23e5 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.MS.LinqService,False).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.MS.LinqService,False).sql new file mode 100644 index 000000000000..2bd6bfbffb64 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.MS.LinqService,True).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.MS.LinqService,True).sql new file mode 100644 index 000000000000..2bd6bfbffb64 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SqlServer.SA.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.MS.LinqService,False).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.MS.LinqService,False).sql new file mode 100644 index 000000000000..2bd6bfbffb64 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.MS.LinqService,True).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.MS.LinqService,True).sql new file mode 100644 index 000000000000..2bd6bfbffb64 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SqlServer.SA.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +OFFSET @n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.SA.MS.LinqService).sql index b6f27cee084d..4621e851e28a 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SqlServer.SA.MS.LinqService).sql @@ -1,75 +1,13 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TakeSkipClass]', N'U') IS NULL) - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Value VarChar(10) -- AnsiString -SET @Value = N'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @skip Int -- Int32 +SET @skip = 3 + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] +OFFSET @skip ROWS diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.MS.LinqService,False).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.MS.LinqService,False).sql index f59c24bc7388..2074872e05cb 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.MS.LinqService,False).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.MS.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP (3) FROM [Child] [ch] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.MS.LinqService,True).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.MS.LinqService,True).sql index 48083f0faa61..8b291cedbf4d 100644 --- a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.MS.LinqService,True).sql +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SqlServer.SA.MS.LinqService,True).sql @@ -20,3 +20,25 @@ SELECT TOP (@take) FROM [Child] [ch] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 2 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.MS.LinqService,False).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.MS.LinqService,False).sql new file mode 100644 index 000000000000..5c83f281b9b3 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.MS.LinqService,True).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.MS.LinqService,True).sql new file mode 100644 index 000000000000..5c83f281b9b3 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SqlServer.SA.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @n Int -- Int32 +SET @n = 1 + +SELECT TOP (@n) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.MS.LinqService,False).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.MS.LinqService,False).sql new file mode 100644 index 000000000000..7d8636443ab8 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.MS.LinqService,True).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.MS.LinqService,True).sql new file mode 100644 index 000000000000..7d0af28a2bd5 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SqlServer.SA.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.MS.LinqService,False).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.MS.LinqService,False).sql new file mode 100644 index 000000000000..6ddc5435c65e --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.MS.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.MS.LinqService,True).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.MS.LinqService,True).sql new file mode 100644 index 000000000000..bf02d3261a6b --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SqlServer.SA.MS.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.MS.LinqService,False).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.MS.LinqService,False).sql new file mode 100644 index 000000000000..48c44cd114c3 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.MS.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT TOP (3) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.MS.LinqService,True).sql b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.MS.LinqService,True).sql new file mode 100644 index 000000000000..641473dd042e --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SqlServer.SA.MS.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @take Int -- Int32 +SET @take = 3 + +SELECT TOP (@take) + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,False,False).sql b/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,False,False).sql index 4dcb794059ce..d1f5b199123e 100644 --- a/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,False,False).sql +++ b/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,False,True).sql b/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,False,True).sql index 8ff06051d1be..bceccad98212 100644 --- a/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,False,True).sql +++ b/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,False,True).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,True,False).sql b/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,True,False).sql index 7baaa20d7b94..2b454f7e4773 100644 --- a/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,True,False).sql +++ b/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,True,False).sql @@ -11,3 +11,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [TestDataMSSA]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,True,True).sql b/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,True,True).sql index 2645ce750e66..6cde74357b5c 100644 --- a/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,True,True).sql +++ b/SqlServer.SA.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SqlServer.SA.MS.LinqService,False,True,True).sql @@ -19,3 +19,19 @@ BeforeExecute DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [TestDataMSSA].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..e2fdf808e6c0 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(4000) NULL, + [CreatedOn] DateTime2 NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.SA.MS.LinqService).sql index aba8af62bc7f..bff49c1c556b 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SqlServer.SA.MS.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +IF (OBJECT_ID(N'[TempTable]', N'U') IS NULL) + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 SELECT @@ -7,3 +33,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..88c0b92e3a5a --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE [t1] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.MS.LinqService,100).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.MS.LinqService,100).sql index 94728a1439b1..31a19a199733 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.MS.LinqService,100).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.MS.LinqService,100).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.MS.LinqService,200).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.MS.LinqService,200).sql index 94728a1439b1..31a19a199733 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.MS.LinqService,200).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SqlServer.SA.MS.LinqService,200).sql @@ -10,3 +10,21 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,100).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,100).sql index dfde14608a68..d044b324bf4a 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,100).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,100).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,200).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,200).sql index dfde14608a68..d044b324bf4a 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,200).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,200).sql @@ -10,3 +10,16 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr] +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.MS.LinqService,100).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.MS.LinqService,100).sql index 94728a1439b1..0725dfd8f4dc 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.MS.LinqService,100).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.MS.LinqService,200).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.MS.LinqService,200).sql index 94728a1439b1..fc35a3536117 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.MS.LinqService,200).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SqlServer.SA.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,100).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,100).sql index dfde14608a68..2c2d9037d598 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,100).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,100).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,200).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,200).sql index dfde14608a68..4bcb33ad76f5 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,200).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,200).sql @@ -10,3 +10,18 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.MS.LinqService,100).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.MS.LinqService,100).sql index 25caf6ee1cd3..26bba154d1bf 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.MS.LinqService,100).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.MS.LinqService,100).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.MS.LinqService,200).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.MS.LinqService,200).sql index 25caf6ee1cd3..7bbf751cb835 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.MS.LinqService,200).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputIntoFromQueryAsyncTest(SqlServer.SA.MS.LinqService,200).sql @@ -10,6 +10,27 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +DELETE [s] +OUTPUT + DELETED.[Id] + @param, + DELETED.[Value] + @param, + DELETED.[ValueStr] + CAST(@param AS VarChar(11)) +INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.MS.LinqService,100).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.MS.LinqService,100).sql index 94728a1439b1..fba4c227ccdb 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.MS.LinqService,100).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.MS.LinqService,200).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.MS.LinqService,200).sql index 94728a1439b1..fba4c227ccdb 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.MS.LinqService,200).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SqlServer.SA.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,100).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,100).sql index dfde14608a68..8134f3248518 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,100).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,200).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,200).sql index dfde14608a68..8134f3248518 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,200).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SqlServer.SA.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [s] +OUTPUT + DELETED.[Id] + 1, + DELETED.[ValueStr] + CAST(1 AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..1ea1e9952287 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..bddc16b8f1e3 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..bddc16b8f1e3 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DELETE [c_1] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.SA.MS.LinqService).sql index 6385b8379d08..0872361fe6d9 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SqlServer.SA.MS.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String SET @FirstName = N'Steven' DECLARE @LastName NVarChar(4000) -- String @@ -54,3 +94,32 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = N'Steven' AND [p].[LastName] = N'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.SA.MS.LinqService).sql index 5457826cc128..e5f20d35a189 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SqlServer.SA.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc0' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc1' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'abc2' + +MERGE INTO [Patient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..7a85f90335c5 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,149 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(4000) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC1' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4000) -- String +SET @Diagnosis = N'ABC2' + +MERGE INTO [xxPatient] [t1] +USING (SELECT @PersonID AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = @Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis + ); + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.SA.MS.LinqService).sql index 5457826cc128..8545fa3e7747 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SqlServer.SA.MS.LinqService).sql @@ -31,3 +31,100 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 0 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 1 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 +DECLARE @i Int -- Int32 +SET @i = 2 + +MERGE INTO [Patient] [t1] +USING (SELECT @id AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.SA.MS.LinqService).sql index 5457826cc128..2924178ec5d3 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SqlServer.SA.MS.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id2 Int -- Int32 +SET @id2 = 5 +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +MERGE INTO [Patient] [t1] +USING (SELECT @id2 AS [PersonID]) [s] ON +( + [t1].[PersonID] = [s].[PersonID] +) +WHEN MATCHED THEN + UPDATE + SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +WHEN NOT MATCHED THEN + INSERT + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + N'abc' + ); + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (2) + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.SA.MS.LinqService).sql index 8183717ffdd8..f13632edd5f9 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SqlServer.SA.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.SA.MS.LinqService).sql index 8183717ffdd8..f13632edd5f9 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SqlServer.SA.MS.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = N'John' AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.SA.MS.LinqService).sql index 3d9a3e55a4d5..27dbc88ff665 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SqlServer.SA.MS.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John0' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 (asynchronously) DECLARE @FirstName NVarChar(4000) -- String @@ -63,6 +79,22 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p NVarChar(4000) -- String +SET @p = N'John1' + +SELECT TOP (2) + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = N'Shepard' + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,1).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,1).sql index d56ec0f3c337..7ca32fa5b053 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,1).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,2).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,2).sql index d56ec0f3c337..b30fb9baa1f8 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,2).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @Id, + @ValueStr +) diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,1).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,1).sql index d56ec0f3c337..418292d95fab 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,1).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,2).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,2).sql index d56ec0f3c337..4e46d8dce5c2 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,2).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.MS.LinqService,100).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.MS.LinqService,100).sql index 8112b43a59f2..3f846dfa1875 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.MS.LinqService,100).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.MS.LinqService,200).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.MS.LinqService,200).sql index 28734e34eebf..988c3d849eca 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.MS.LinqService,200).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SqlServer.SA.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.MS.LinqService,100).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.MS.LinqService,100).sql index a21ac917f2fd..7b54bd5a9622 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.MS.LinqService,100).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 100 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.MS.LinqService,200).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.MS.LinqService,200).sql index 1741035d319f..a827cbd29245 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.MS.LinqService,200).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SqlServer.SA.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @param Int -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] + CAST(@param AS VarChar(11)) +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 DECLARE @param Int -- Int32 SET @param = 200 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,1).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,1).sql index d56ec0f3c337..fd2deeba120d 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,1).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,2).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,2).sql index d56ec0f3c337..9897491fd824 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,2).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SqlServer.SA.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 2 +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Id], + [Value], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Id, + @Value, + @ValueStr +) diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,1).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,1).sql index d56ec0f3c337..418292d95fab 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,1).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,1).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 100 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,2).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,2).sql index d56ec0f3c337..4e46d8dce5c2 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,2).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SqlServer.SA.MS.LinqService,2).sql @@ -1,21 +1,26 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Value Int -- Int32 +SET @Value = 200 +DECLARE @value_1 Int -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(50) -- String +SET @ValueStr = N'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +INSERT INTO [TableWithData] +( + [Value], + [Id], + [ValueStr] +) +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +VALUES +( + @Value, + @value_1, + @ValueStr +) diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.SA.MS.LinqService).sql index 8b9d4bdd5380..99c723a07ccb 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputFullAsync(SqlServer.SA.MS.LinqService).sql @@ -220,3 +220,57 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + $action, + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.SA.MS.LinqService).sql index 8b9d4bdd5380..7c19b85c9f08 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.MergeWithOutputWithoutActionAsync(SqlServer.SA.MS.LinqService).sql @@ -220,3 +220,56 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +OUTPUT + DELETED.[Id], + DELETED.[Field1], + DELETED.[Field2], + DELETED.[Field3], + DELETED.[Field4], + DELETED.[Field5], + INSERTED.[Id], + INSERTED.[Field1], + INSERTED.[Field2], + INSERTED.[Field3], + INSERTED.[Field4], + INSERTED.[Field5] +; + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.SA.MS.LinqService).sql index bef4d6c7db72..29f1f90bee16 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SqlServer.SA.MS.LinqService).sql @@ -220,6 +220,46 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.SA.MS.LinqService).sql index bef4d6c7db72..94dc73d3a595 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SqlServer.SA.MS.LinqService).sql @@ -220,6 +220,44 @@ VALUES @Field4 ) +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) +; + BeforeExecute -- SqlServer.SA.MS SqlServer.2019 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..5a0788a3581c --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [p1] +SET + [p1].[ParentID] = [p2].[ParentID] +FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..c58c32e96bef --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..c58c32e96bef --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..8ec2def8a2cf --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [c_1] +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..7bfd4ec07f39 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..7bfd4ec07f39 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,41 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [a_Parent] +SET + [a_Parent].[Value1] = 5 +FROM + [Child] [child_1] + LEFT JOIN [Parent] [a_Parent] ON [child_1].[ParentID] = [a_Parent].[ParentID] +WHERE + [child_1].[ChildID] = 10000 + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.SA.MS.LinqService).sql new file mode 100644 index 000000000000..c9e0f0a24ca5 --- /dev/null +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SqlServer.SA.MS.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(4000) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(4000) NOT NULL, + [MiddleName] NVarChar(4000) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @FirstName NVarChar(4000) -- String +SET @FirstName = N'Steven' +DECLARE @LastName NVarChar(4000) -- String +SET @LastName = N'King' +DECLARE @MiddleName NVarChar(4000) -- String +SET @MiddleName = N'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = N'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT TOP (2) + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.SA.MS.LinqService).sql index d871b729246b..a65cbe1a1087 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SqlServer.SA.MS.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT SCOPE_IDENTITY() +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = N'M' +DECLARE @Name_FirstName NVarChar(4000) -- String +SET @Name_FirstName = N'UpdateComplex' +DECLARE @Name_MiddleName NVarChar(4000) -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(4000) -- String +SET @Name_LastName = N'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP (1) + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql index ce4629649e2d..8a456b32836f 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 SELECT diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..7ebf202702a8 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..6d031584d26e 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql index 8322041cd218..8ac30d08829f 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 SELECT diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..1cd7ca37ca3d 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..1758cc1b6b75 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..64ba3c4006be 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..9f5d485273c1 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..d2e7bb749a97 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..0e7ad089155f 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql index ce4629649e2d..8a456b32836f 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 SELECT diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..7ebf202702a8 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,20 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..6d031584d26e 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,22 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql index 8322041cd218..8ac30d08829f 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,4 +1,27 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [Destination] +( + [Id], + [Value], + [ValueStr] +) +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 SELECT diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..1cd7ca37ca3d 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..1758cc1b6b75 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdate(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..64ba3c4006be 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,18 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + DELETED.[Value], + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..9f5d485273c1 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,16 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + [s].[ValueStr], + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..d2e7bb749a97 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,15 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [s].[Id], + [t].[Value] = [s].[Value], + [t].[ValueStr] = [s].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [s] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [s].[Id] diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql index 3e4805a57ce0..0e7ad089155f 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SqlServer.SA.MS.LinqService).sql @@ -1,438 +1,17 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[DestinationTable]', N'U') IS NULL) - CREATE TABLE [DestinationTable] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [t] +SET + [t].[Id] = [t1].[Id], + [t].[Value] = [t1].[Value], + [t].[ValueStr] = [t1].[ValueStr] +OUTPUT + INSERTED.[Value] +FROM + [TableWithData] [t1] + INNER JOIN [DestinationTable] [t] ON [t].[Id] = [t1].[Id] +WHERE + [t1].[Id] = 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql index 7ea4fbcbc1ec..5ce8ec893639 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 SELECT diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql index de45265b72d7..71fae4cf3063 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql index de45265b72d7..7a7687921537 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql @@ -1,219 +1,18 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql index de45265b72d7..937b21ebef5b 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql index de45265b72d7..95418219cee4 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql index de45265b72d7..aabbf67e6c8f 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.MS.LinqService).sql index de45265b72d7..2fa9c44e02a5 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.MS.LinqService).sql @@ -1,219 +1,13 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.SA.MS.LinqService).sql index 7ea4fbcbc1ec..79873bfdcb24 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestIntoAsync(SqlServer.SA.MS.LinqService).sql @@ -1,4 +1,25 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 SELECT diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql index 7ea4fbcbc1ec..8e488d13fe7a 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputIntoTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 SELECT diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql index de45265b72d7..fedc0588d15a 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql index de45265b72d7..473257a22a09 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithDefaultOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql @@ -1,219 +1,19 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Id], + DELETED.[Value], + DELETED.[ValueStr], + INSERTED.[Id], + INSERTED.[Value], + INSERTED.[ValueStr] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql index de45265b72d7..17f76208a885 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsync(SqlServer.SA.MS.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql index de45265b72d7..15f7f99710fa 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncSingleRecord(SqlServer.SA.MS.LinqService).sql @@ -1,219 +1,15 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + DELETED.[Value], + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql index de45265b72d7..5b7251338744 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SqlServer.SA.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] > 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.MS.LinqService).sql index de45265b72d7..f79b707be3af 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SqlServer.SA.MS.LinqService).sql @@ -1,219 +1,14 @@ BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -IF (OBJECT_ID(N'[TableWithData]', N'U') IS NULL) - CREATE TABLE [TableWithData] - ( - [Id] Int NOT NULL, - [Value] Int NOT NULL, - [ValueStr] NVarChar(50) NULL - ) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 1 -DECLARE @Value Int -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 2 -DECLARE @Value Int -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 3 -DECLARE @Value Int -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 4 -DECLARE @Value Int -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 5 -DECLARE @Value Int -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 6 -DECLARE @Value Int -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 7 -DECLARE @Value Int -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 8 -DECLARE @Value Int -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 -DECLARE @Id Int -- Int32 -SET @Id = 9 -DECLARE @Value Int -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(50) -- String -SET @ValueStr = N'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SqlServer.SA.MS SqlServer.2019 - -DROP TABLE IF EXISTS [TableWithData] +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Value] +WHERE + [TableWithData].[Id] = 3 diff --git a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.SA.MS.LinqService).sql b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.SA.MS.LinqService).sql index 7ea4fbcbc1ec..bd84c6e47a9d 100644 --- a/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.SA.MS.LinqService).sql +++ b/SqlServer.SA.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestIntoAsync(SqlServer.SA.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] + N'Upd' +OUTPUT + INSERTED.[Id], + DELETED.[Value], + INSERTED.[ValueStr] +INTO [destination] +( + [Id], + [Value], + [ValueStr] +) +WHERE + [TableWithData].[Id] > 3 + +BeforeExecute -- SqlServer.SA.MS SqlServer.2019 SELECT diff --git a/SqlServer.SA.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.SA.MS).sql b/SqlServer.SA.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.SA.MS).sql new file mode 100644 index 000000000000..24685fc4c230 --- /dev/null +++ b/SqlServer.SA.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.SA.MS).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.SA.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.SA.MS).sql b/SqlServer.SA.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.SA.MS).sql new file mode 100644 index 000000000000..2565be5c5cda --- /dev/null +++ b/SqlServer.SA.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.SA.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.SA.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.SA.MS).sql b/SqlServer.SA.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.SA.MS).sql new file mode 100644 index 000000000000..2565be5c5cda --- /dev/null +++ b/SqlServer.SA.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.SA.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.SA.MS SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.SA/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.SA).sql b/SqlServer.SA/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.SA).sql new file mode 100644 index 000000000000..bf51d72a2bb8 --- /dev/null +++ b/SqlServer.SA/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SqlServer.SA).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.SA/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.SA).sql b/SqlServer.SA/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.SA).sql new file mode 100644 index 000000000000..8973528e4b84 --- /dev/null +++ b/SqlServer.SA/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SqlServer.SA).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SqlServer.SA/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.SA).sql b/SqlServer.SA/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.SA).sql new file mode 100644 index 000000000000..8973528e4b84 --- /dev/null +++ b/SqlServer.SA/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SqlServer.SA).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SqlServer.SA SqlServer.2019 (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From 2088ed80f2724b7da3b05ea216cf2bbe1a8ed1d4 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 22:08:33 +0100 Subject: [PATCH 23/40] [Linux / Oracle 12c] baselines --- ...l4Async(Oracle.12.Managed.LinqService).sql | 18 ++ ...y2Async(Oracle.12.Managed.LinqService).sql | 30 +++ ...le1Test(Oracle.12.Managed.LinqService).sql | 9 + ...le2Test(Oracle.12.Managed.LinqService).sql | 11 + ...st1Test(Oracle.12.Managed.LinqService).sql | 9 + ...st2Test(Oracle.12.Managed.LinqService).sql | 11 + ...yncTest(Oracle.12.Managed.LinqService).sql | 18 ++ ...yncTest(Oracle.12.Managed.LinqService).sql | 15 ++ ...kipTest(Oracle.12.Managed.LinqService).sql | 16 ++ ...Default(Oracle.12.Managed.LinqService).sql | 20 ++ ...yncTest(Oracle.12.Managed.LinqService).sql | 21 ++ ...yncTest(Oracle.12.Managed.LinqService).sql | 21 ++ ...stAsync(Oracle.12.Managed.LinqService).sql | 40 ++++ ...tAsync2(Oracle.12.Managed.LinqService).sql | 40 ++++ ...ncdTest(Oracle.12.Managed.LinqService).sql | 16 ++ ...t3Async(Oracle.12.Managed.LinqService).sql | 28 +++ ...stAsync(Oracle.12.Managed.LinqService).sql | 36 +++ ...stAsync(Oracle.12.Managed.LinqService).sql | 24 ++ ...tAsync2(Oracle.12.Managed.LinqService).sql | 24 ++ ...tAsync1(Oracle.12.Managed.LinqService).sql | 28 +++ ...tAsync2(Oracle.12.Managed.LinqService).sql | 28 +++ ...stAsync(Oracle.12.Managed.LinqService).sql | 24 ++ ...tAsync2(Oracle.12.Managed.LinqService).sql | 24 ++ ...teAsync(Oracle.12.Managed.LinqService).sql | 197 ++-------------- ...teAsync(Oracle.12.Managed.LinqService).sql | 191 +--------------- ...teAsync(Oracle.12.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.12.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.12.Managed.LinqService).sql | 191 +--------------- ...orAsync(Oracle.12.Managed.LinqService).sql | 191 +--------------- ...orAsync(Oracle.12.Managed.LinqService).sql | 191 +--------------- ...teAsync(Oracle.12.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.12.Managed.LinqService).sql | 193 +--------------- ...t1Async(Oracle.12.Managed.LinqService).sql | 19 ++ ...ntAsync(Oracle.12.Managed.LinqService).sql | 97 ++++++++ ...edAsync(Oracle.12.Managed.LinqService).sql | 80 +++++++ ...t1Async(Oracle.12.Managed.LinqService).sql | 8 + ...t2Async(Oracle.12.Managed.LinqService).sql | 10 + ...x1Async(Oracle.12.Managed.LinqService).sql | 16 ++ ...sue4602(Oracle.12.Managed.LinqService).sql | 194 +--------------- ...7_Async(Oracle.12.Managed.LinqService).sql | 31 +++ ...saction(Oracle.12.Managed.LinqService).sql | 31 +++ ...onAsync(Oracle.12.Managed.LinqService).sql | 25 ++ ...t1Async(Oracle.12.Managed.LinqService).sql | 11 + ...18Async(Oracle.12.Managed.LinqService).sql | 14 ++ ...r1Async(Oracle.12.Managed.LinqService).sql | 7 + ...132Test(Oracle.12.Managed.LinqService).sql | 213 ++++++++++++++++++ ...c(Oracle.12.Managed.LinqService,False).sql | 16 ++ ...nc(Oracle.12.Managed.LinqService,True).sql | 16 ++ ...c(Oracle.12.Managed.LinqService,False).sql | 16 ++ ...nc(Oracle.12.Managed.LinqService,True).sql | 16 ++ ...p1Async(Oracle.12.Managed.LinqService).sql | 106 +-------- ...c(Oracle.12.Managed.LinqService,False).sql | 20 ++ ...nc(Oracle.12.Managed.LinqService,True).sql | 24 ++ ...c(Oracle.12.Managed.LinqService,False).sql | 12 + ...nc(Oracle.12.Managed.LinqService,True).sql | 12 + ...c(Oracle.12.Managed.LinqService,False).sql | 12 + ...nc(Oracle.12.Managed.LinqService,True).sql | 14 ++ ...c(Oracle.12.Managed.LinqService,False).sql | 12 + ...nc(Oracle.12.Managed.LinqService,True).sql | 14 ++ ...c(Oracle.12.Managed.LinqService,False).sql | 10 + ...nc(Oracle.12.Managed.LinqService,True).sql | 12 + ...Managed.LinqService,False,False,False).sql | 23 ++ ....Managed.LinqService,False,False,True).sql | 23 ++ ....Managed.LinqService,False,True,False).sql | 23 ++ ...2.Managed.LinqService,False,True,True).sql | 23 ++ ....Managed.LinqService,True,False,False).sql | 23 ++ ...2.Managed.LinqService,True,False,True).sql | 23 ++ ...2.Managed.LinqService,True,True,False).sql | 23 ++ ...12.Managed.LinqService,True,True,True).sql | 23 ++ ...e1Async(Oracle.12.Managed.LinqService).sql | 77 +++++++ ...leAsync(Oracle.12.Managed.LinqService).sql | 53 +++++ ...meAsync(Oracle.12.Managed.LinqService).sql | 132 +++++++++++ ...t2Async(Oracle.12.Managed.LinqService).sql | 44 ++++ ...t3Async(Oracle.12.Managed.LinqService).sql | 46 ++++ ...t4Async(Oracle.12.Managed.LinqService).sql | 46 ++++ ...meAsync(Oracle.12.Managed.LinqService).sql | 112 +++++++++ ...e1Async(Oracle.12.Managed.LinqService).sql | 98 ++++++++ ...meAsync(Oracle.12.Managed.LinqService).sql | 163 ++++++++++++++ ...e3Async(Oracle.12.Managed.LinqService).sql | 98 ++++++++ ...3xAsync(Oracle.12.Managed.LinqService).sql | 104 +++++++++ ...y1Async(Oracle.12.Managed.LinqService).sql | 15 ++ ...y2Async(Oracle.12.Managed.LinqService).sql | 15 ++ ...y4Async(Oracle.12.Managed.LinqService).sql | 34 +++ ...eryAsyn(Oracle.12.Managed.LinqService).sql | 33 +++ ...bleAsyn(Oracle.12.Managed.LinqService).sql | 31 +++ ...nsAsync(Oracle.12.Managed.LinqService).sql | 127 ++++++++--- ...llAsync(Oracle.12.Managed.LinqService).sql | 131 +++++------ ...rtAsync(Oracle.12.Managed.LinqService).sql | 126 +++++------ ...stAsync(Oracle.12.Managed.LinqService).sql | 85 ++++--- ...nc(Oracle.12.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.12.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.12.Managed.LinqService,two).sql | 80 ++++--- ...nc(Oracle.12.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.12.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.12.Managed.LinqService,two).sql | 80 ++++--- ...nc(Oracle.12.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.12.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.12.Managed.LinqService,two).sql | 80 ++++--- ...12Async(Oracle.12.Managed.LinqService).sql | 28 +++ ...e1Async(Oracle.12.Managed.LinqService).sql | 54 +++++ ...e2Async(Oracle.12.Managed.LinqService).sql | 54 +++++ ...e4Async(Oracle.12.Managed.LinqService).sql | 63 ++++++ ...n1Async(Oracle.12.Managed.LinqService).sql | 47 ++++ ...syncOld(Oracle.12.Managed.LinqService).sql | 47 ++++ ...meAsync(Oracle.12.Managed.LinqService).sql | 150 ++++++++++++ ...x1Async(Oracle.12.Managed.LinqService).sql | 57 +++++ ...inq.AsyncTests.Test(Oracle.12.Managed).sql | 18 ++ ...nq.AsyncTests.Test1(Oracle.12.Managed).sql | 9 + ...ncTests.TestForEach(Oracle.12.Managed).sql | 9 + 109 files changed, 3865 insertions(+), 2457 deletions(-) create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.12.Managed.LinqService,False).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.12.Managed.LinqService,True).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.12.Managed.LinqService,False).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.12.Managed.LinqService,True).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.12.Managed.LinqService,False).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.12.Managed.LinqService,True).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.12.Managed.LinqService,False).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.12.Managed.LinqService,True).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.12.Managed.LinqService,False).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.12.Managed.LinqService,True).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.12.Managed.LinqService,False).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.12.Managed.LinqService,True).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.12.Managed.LinqService).sql create mode 100644 Oracle.12.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.12.Managed).sql create mode 100644 Oracle.12.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.12.Managed).sql create mode 100644 Oracle.12.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.12.Managed).sql diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..becb85f71f8e --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" <= 3 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..7363ade53b6f --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT DISTINCT + a_Parent1."ParentID" + FROM + "Child" t1 + INNER JOIN "Parent" a_Parent1 ON t1."ParentID" = a_Parent1."ParentID" + ) m_1 + INNER JOIN "Child" d + INNER JOIN "Parent" a_Parent1_1 ON d."ParentID" = a_Parent1_1."ParentID" + ON m_1."ParentID" = a_Parent1_1."ParentID" + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + a_Parent1."ParentID" +FROM + "Child" t1 + INNER JOIN "Parent" a_Parent1 ON t1."ParentID" = a_Parent1."ParentID" +GROUP BY + a_Parent1."ParentID" + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..f0be695b8f14 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..3e983765a983 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..f0be695b8f14 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..3e983765a983 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..5bd6c3622c17 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +SELECT + CASE + WHEN :ID IN ( + SELECT + t1."PersonID" + FROM + "Person" t1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..f7c7b1a31128 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."PersonID" = 1 +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.12.Managed.LinqService).sql index 9a9ed8113a91..cfd5ca5fcddb 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.12.Managed.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY t1."ParentID" OFFSET :skip ROWS FETCH NEXT :take ROWS ONLY +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @skip Int32 +SET @skip = 1 +DECLARE @take Int32 +SET @take = 2 + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +ORDER BY + t1."ParentID" +OFFSET :skip ROWS FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..4a3d9b05b751 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 +DECLARE @p_1 Int32 +SET @p_1 = 2 +DECLARE @p_2 Int32 +SET @p_2 = 3 +DECLARE @param Int32 +SET @param = 4 + +SELECT + o."ParentID", + o."Value1" +FROM + "Parent" o +WHERE + o."ParentID" IN (:p, :p_1, :p_2) OR o."ParentID" = :param +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..f16157eeccd2 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..f16157eeccd2 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..26498974ac0c --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..26498974ac0c --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..edf75c415842 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = :p +ORDER BY + x."ParentID" DESC +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..d218ace68753 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT :p ROWS ONLY + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT :p ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..3d5b15688c74 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..8aa0899435fe --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..8aa0899435fe --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..0fecdb16a1b7 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..0fecdb16a1b7 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..a6ed25e62e07 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..a6ed25e62e07 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.12.Managed.LinqService).sql index 6fee7be6db12..646734bfb9b1 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.12.Managed.LinqService).sql @@ -1,183 +1,20 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "AsyncDataTable" c_1 + WHERE + c_1."Id" = :p ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; + THEN 1 + ELSE 0 + END +FROM SYS.DUAL diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.12.Managed.LinqService).sql index 6fee7be6db12..13d778edba6e 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.12.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.12.Managed.LinqService).sql index 6fee7be6db12..73206b725194 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.12.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 1 ROWS ONLY diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.12.Managed.LinqService).sql index 6fee7be6db12..73206b725194 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.12.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 1 ROWS ONLY diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.12.Managed.LinqService).sql index 6fee7be6db12..13d778edba6e 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.12.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.12.Managed.LinqService).sql index 6fee7be6db12..b50ab816947a 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.12.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MAX(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.12.Managed.LinqService).sql index 6fee7be6db12..1f8d38e056f1 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.12.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MIN(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.12.Managed.LinqService).sql index 6fee7be6db12..c34515b436c9 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.12.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.12.Managed.LinqService).sql index 6fee7be6db12..c34515b436c9 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.12.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..054c8591b74f --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" = 1 +UNION ALL +SELECT + p_1."ParentID", + p_1."Value1" +FROM + "Parent" p_1 +WHERE + p_1."ParentID" = 2 + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.12.Managed.LinqService).sql index d10f52f394b4..43169bc53631 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.12.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value Varchar2(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.12.Managed.LinqService).sql index ea3d7666bcaf..7680cbe1aa85 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.12.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value Varchar2(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" r +SET + "Stamp" = r."Stamp" + 1, + "Value" = :Value +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" r +SET + "Stamp" = r."Stamp" + 1, + "Value" = :Value +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 @@ -28,6 +84,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 @@ -38,6 +106,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..7f9e57d62380 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" t1 + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..ab868f487917 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" > 2 + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..490bcf0c1bad --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" c_1 + LEFT JOIN "Parent" a_Parent ON c_1."ParentID" = a_Parent."ParentID" + WHERE + a_Parent."ParentID" = t1."ParentID" + )) +FROM + "Parent" t1 + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.12.Managed.LinqService).sql index f3d5cbd8a9e2..ab8137b81393 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.12.Managed.LinqService).sql @@ -1,187 +1,11 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicParent" - ( - ID Int NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY (ID) - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -CREATE SEQUENCE "SIDENTITY_DynamicParent" - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -CREATE OR REPLACE TRIGGER "TIDENTITY_DynamicParent" -BEFORE INSERT ON "DynamicParent" FOR EACH ROW -BEGIN - SELECT "SIDENTITY_DynamicParent".NEXTVAL INTO :NEW.ID FROM dual; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicChild" - ( - ID Int NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY (ID) - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -CREATE SEQUENCE "SIDENTITY_DynamicChild" - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -CREATE OR REPLACE TRIGGER "TIDENTITY_DynamicChild" -BEFORE INSERT ON "DynamicChild" FOR EACH ROW -BEGIN - SELECT "SIDENTITY_DynamicChild".NEXTVAL INTO :NEW.ID FROM dual; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + it.ID +FROM + "DynamicParent" it + LEFT JOIN "DynamicChild" a_Child ON it.ID = a_Child."ParentID" +WHERE + a_Child.ID = 123 diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.12.Managed.LinqService).sql index 581136f8220c..795fe3246fa9 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.12.Managed.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransactionAsync(ReadCommitted) BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.12.Managed.LinqService).sql index 03aa1e125e57..2e0203966fd1 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.12.Managed.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransaction BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..1d40d9891fa8 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" a_Children + INNER JOIN "GrandChild" a_GrandChildren ON a_Children."ParentID" = a_GrandChildren."ParentID" AND a_Children."ChildID" = a_GrandChildren."ChildID" + WHERE + p."ParentID" = a_Children."ParentID" + ) +FROM + "Parent" p + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..cd3b7a2e3e2f --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +WHERE + t1."Value1" = 1 + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..f0d4e08f01a3 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT DISTINCT + p1."PersonID", + p1."Gender", + p1."FirstName", + p1."LastName" +FROM + "Person" p1 +WHERE + p1."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + p1."Gender" = 'F' + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..1cf1f83fdd83 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,7 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + 1 +FROM SYS.DUAL + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..99509bf21852 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."MiddleName", + COUNT(*) +FROM + "Person" x +WHERE + x."MiddleName" IS NOT NULL +GROUP BY + x."MiddleName" +UNION ALL +SELECT + x_1."MiddleName", + COUNT(*) +FROM + "Person" x_1 +WHERE + x_1."MiddleName" IS NOT NULL +GROUP BY + x_1."MiddleName" +UNION ALL +SELECT + x_2."MiddleName", + COUNT(*) +FROM + "Person" x_2 +WHERE + x_2."MiddleName" IS NOT NULL +GROUP BY + x_2."MiddleName" +UNION ALL +SELECT + x_3."MiddleName", + COUNT(*) +FROM + "Person" x_3 +WHERE + x_3."MiddleName" IS NOT NULL +GROUP BY + x_3."MiddleName" +UNION ALL +SELECT + x_4."MiddleName", + COUNT(*) +FROM + "Person" x_4 +WHERE + x_4."MiddleName" IS NOT NULL +GROUP BY + x_4."MiddleName" +UNION ALL +SELECT + x_5."MiddleName", + COUNT(*) +FROM + "Person" x_5 +WHERE + x_5."MiddleName" IS NOT NULL +GROUP BY + x_5."MiddleName" +UNION ALL +SELECT + x_6."MiddleName", + COUNT(*) +FROM + "Person" x_6 +WHERE + x_6."MiddleName" IS NOT NULL +GROUP BY + x_6."MiddleName" +UNION ALL +SELECT + x_7."MiddleName", + COUNT(*) +FROM + "Person" x_7 +WHERE + x_7."MiddleName" IS NOT NULL +GROUP BY + x_7."MiddleName" +UNION ALL +SELECT + x_8."MiddleName", + COUNT(*) +FROM + "Person" x_8 +WHERE + x_8."MiddleName" IS NOT NULL +GROUP BY + x_8."MiddleName" +UNION ALL +SELECT + x_9."MiddleName", + COUNT(*) +FROM + "Person" x_9 +WHERE + x_9."MiddleName" IS NOT NULL +GROUP BY + x_9."MiddleName" +UNION ALL +SELECT + x_10."MiddleName", + COUNT(*) +FROM + "Person" x_10 +WHERE + x_10."MiddleName" IS NOT NULL +GROUP BY + x_10."MiddleName" +UNION ALL +SELECT + x_11."MiddleName", + COUNT(*) +FROM + "Person" x_11 +WHERE + x_11."MiddleName" IS NOT NULL +GROUP BY + x_11."MiddleName" +UNION ALL +SELECT + x_12."MiddleName", + COUNT(*) +FROM + "Person" x_12 +WHERE + x_12."MiddleName" IS NOT NULL +GROUP BY + x_12."MiddleName" +UNION ALL +SELECT + x_13."MiddleName", + COUNT(*) +FROM + "Person" x_13 +WHERE + x_13."MiddleName" IS NOT NULL +GROUP BY + x_13."MiddleName" +UNION ALL +SELECT + x_14."MiddleName", + COUNT(*) +FROM + "Person" x_14 +WHERE + x_14."MiddleName" IS NOT NULL +GROUP BY + x_14."MiddleName" +UNION ALL +SELECT + x_15."MiddleName", + COUNT(*) +FROM + "Person" x_15 +WHERE + x_15."MiddleName" IS NOT NULL +GROUP BY + x_15."MiddleName" +UNION ALL +SELECT + x_16."MiddleName", + COUNT(*) +FROM + "Person" x_16 +WHERE + x_16."MiddleName" IS NOT NULL +GROUP BY + x_16."MiddleName" +UNION ALL +SELECT + x_17."MiddleName", + COUNT(*) +FROM + "Person" x_17 +WHERE + x_17."MiddleName" IS NOT NULL +GROUP BY + x_17."MiddleName" +UNION ALL +SELECT + x_18."MiddleName", + COUNT(*) +FROM + "Person" x_18 +WHERE + x_18."MiddleName" IS NOT NULL +GROUP BY + x_18."MiddleName" +UNION ALL +SELECT + x_19."MiddleName", + COUNT(*) +FROM + "Person" x_19 +WHERE + x_19."MiddleName" IS NOT NULL +GROUP BY + x_19."MiddleName" +UNION ALL +SELECT + x_20."MiddleName", + COUNT(*) +FROM + "Person" x_20 +WHERE + x_20."MiddleName" IS NOT NULL +GROUP BY + x_20."MiddleName" + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.12.Managed.LinqService,False).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.12.Managed.LinqService,False).sql new file mode 100644 index 000000000000..b58b0a3d15f0 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.12.Managed.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.12.Managed.LinqService,True).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.12.Managed.LinqService,True).sql new file mode 100644 index 000000000000..b58b0a3d15f0 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.12.Managed.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.12.Managed.LinqService,False).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.12.Managed.LinqService,False).sql new file mode 100644 index 000000000000..b58b0a3d15f0 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.12.Managed.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.12.Managed.LinqService,True).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.12.Managed.LinqService,True).sql new file mode 100644 index 000000000000..b58b0a3d15f0 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.12.Managed.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.12.Managed.LinqService).sql index 9420541bc7a2..9bc2071d63d6 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.12.Managed.LinqService).sql @@ -1,97 +1,13 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "TakeSkipClass" - ( - "Value" VarChar(10) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @skip Int32 +SET @skip = 3 + +SELECT + t1."Value" as "Value_1" +FROM + "TakeSkipClass" t1 +ORDER BY + t1."Value" +OFFSET :skip ROWS diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.12.Managed.LinqService,False).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.12.Managed.LinqService,False).sql index 567b6b3556b4..061cc68718c8 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.12.Managed.LinqService,False).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.12.Managed.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" ch FETCH NEXT 3 ROWS ONLY +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.12.Managed.LinqService,True).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.12.Managed.LinqService,True).sql index 87a234c2791f..7a8b19b7b7e6 100644 --- a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.12.Managed.LinqService,True).sql +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.12.Managed.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" ch FETCH NEXT :take ROWS ONLY +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 2 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT :take ROWS ONLY + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.12.Managed.LinqService,False).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.12.Managed.LinqService,False).sql new file mode 100644 index 000000000000..557b7a02fde9 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.12.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :n ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.12.Managed.LinqService,True).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.12.Managed.LinqService,True).sql new file mode 100644 index 000000000000..557b7a02fde9 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.12.Managed.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :n ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.12.Managed.LinqService,False).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.12.Managed.LinqService,False).sql new file mode 100644 index 000000000000..603796d4f5bf --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.12.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.12.Managed.LinqService,True).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.12.Managed.LinqService,True).sql new file mode 100644 index 000000000000..6678677bc342 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.12.Managed.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.12.Managed.LinqService,False).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.12.Managed.LinqService,False).sql new file mode 100644 index 000000000000..18e228b8416e --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.12.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.12.Managed.LinqService,True).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.12.Managed.LinqService,True).sql new file mode 100644 index 000000000000..85e3601febda --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.12.Managed.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.12.Managed.LinqService,False).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.12.Managed.LinqService,False).sql new file mode 100644 index 000000000000..afc78e4b6e8c --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.12.Managed.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.12.Managed.LinqService,True).sql b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.12.Managed.LinqService,True).sql new file mode 100644 index 000000000000..2a692c97bbe7 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.12.Managed.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,False,False).sql b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,False,False).sql index 7df37458f2b3..fa6609f14a30 100644 --- a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,False,False).sql +++ b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,False,False).sql @@ -10,3 +10,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,False,True).sql b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,False,True).sql index 269c86b89da7..194367c817fd 100644 --- a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,False,True).sql +++ b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,False,True).sql @@ -19,3 +19,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,True,False).sql b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,True,False).sql index 7df37458f2b3..fa6609f14a30 100644 --- a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,True,False).sql +++ b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,True,False).sql @@ -10,3 +10,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,True,True).sql b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,True,True).sql index 269c86b89da7..194367c817fd 100644 --- a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,True,True).sql +++ b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,False,True,True).sql @@ -19,3 +19,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,False,False).sql b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,False,False).sql index 490b208d5013..7e1a9fac2a43 100644 --- a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,False,False).sql +++ b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,False,False).sql @@ -17,3 +17,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2"@ORC12 +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,False,True).sql b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,False,True).sql index 03338f1175fd..5cd247fec836 100644 --- a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,False,True).sql +++ b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,False,True).sql @@ -26,3 +26,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2"@ORC12 +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,True,False).sql b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,True,False).sql index 490b208d5013..7e1a9fac2a43 100644 --- a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,True,False).sql +++ b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,True,False).sql @@ -17,3 +17,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2"@ORC12 +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,True,True).sql b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,True,True).sql index 03338f1175fd..5cd247fec836 100644 --- a/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,True,True).sql +++ b/Oracle.12.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.12.Managed.LinqService,True,True,True).sql @@ -26,3 +26,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2"@ORC12 +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..4fdb4659e954 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,77 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "TestTable" +( + ID Int NOT NULL, + "Field1" VarChar(50) NULL, + "Field2" VarChar(255) NULL, + "CreatedOn" timestamp NULL, + + CONSTRAINT "PK_TestTable" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_TestTable" + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_TestTable" +BEFORE INSERT ON "TestTable" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_TestTable".NEXTVAL INTO :NEW.ID FROM dual; +END; + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1.ID, + t1."Field1", + t1."Field2", + t1."CreatedOn" +FROM + "TestTable" t1 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_TestTable"'; + EXECUTE IMMEDIATE 'DROP TABLE "TestTable"'; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.12.Managed.LinqService).sql index f45ee785aeed..093e4f60362a 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.12.Managed.LinqService).sql @@ -1,4 +1,45 @@ BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE ' + CREATE TABLE "TempTable" + ( + ID Int NOT NULL + ) + '; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -955 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "TempTable" +( + ID +) +SELECT + p."ParentID" +FROM + "Parent" p + +BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 SELECT @@ -7,3 +48,15 @@ FROM "Parent" p INNER JOIN "TempTable" t ON p."ParentID" = t.ID +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..9b3bee2ac331 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,132 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson_ol" t1 +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..357811663504 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..f0f14f6cda59 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..f0f14f6cda59 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.12.Managed.LinqService).sql index a5616a995ebd..de8cfa541459 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.12.Managed.LinqService).sql @@ -1,5 +1,59 @@ BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) DECLARE @FirstName Varchar2(6) -- String SET @FirstName = 'Steven' DECLARE @LastName Varchar2(4) -- String @@ -58,3 +112,61 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" p +WHERE + p."FirstName" = 'Steven' AND p."LastName" = 'King' AND + p."Gender" = 'M' + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.12.Managed.LinqService).sql index e3bc897380df..b12528acd66d 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.12.Managed.LinqService).sql @@ -38,3 +38,101 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc0' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc1' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc2' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..3a20e958e353 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,163 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPatient" +( + "PersonID" Int NOT NULL, + "Diagnosis" VarChar(255) NULL, + + CONSTRAINT "PK_xxPatient" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.12.Managed.LinqService).sql index e3bc897380df..ab75594c3bac 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.12.Managed.LinqService).sql @@ -38,3 +38,101 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.12.Managed.LinqService).sql index e3bc897380df..5e6bba3f3404 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.12.Managed.LinqService).sql @@ -38,3 +38,107 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 0 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 1 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 2 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.12.Managed.LinqService).sql index 52fdc013debf..1d26c5de7c2c 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.12.Managed.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.12.Managed.LinqService).sql index 52fdc013debf..1d26c5de7c2c 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.12.Managed.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.12.Managed.LinqService).sql index cb34ac381e43..487c35491da7 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.12.Managed.LinqService).sql @@ -36,6 +36,23 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Varchar2(5) -- String +SET @p = 'John0' + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) DECLARE @FirstName Varchar2(5) -- String @@ -66,6 +83,23 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Varchar2(5) -- String +SET @p = 'John1' + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.12.Managed.LinqService).sql index 5cd102aa608d..49e9f709e6c5 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.12.Managed.LinqService).sql @@ -218,6 +218,39 @@ VALUES :Field4 ) +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +MERGE INTO "TestMerge1" Target +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 + WHERE + t1."Id" = 5 +) "Source" +ON (Target."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.12.Managed.LinqService).sql index 5cd102aa608d..12c4bf0c52dc 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.12.Managed.LinqService).sql @@ -218,6 +218,37 @@ VALUES :Field4 ) +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +MERGE INTO "TestMerge1" Target +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 +) "Source" +ON (Target."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Oracle.12.Managed Oracle.Managed Oracle12 diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.12.Managed.LinqService).sql index fb64c2ffa961..785c65d37eb0 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.12.Managed.LinqService).sql @@ -1,43 +1,98 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_N" < 0 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + 3002, + "source_N" + ) +SELECT + 42 as "source_N", + 3000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" t1 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 3002 BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT ALL +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + 4002, + "source_N" + ) +SELECT + 4000 as "source_ID", + 42 as "source_N" +FROM SYS.DUAL + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" t1 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 4001 OR x.ID = 4002 diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.12.Managed.LinqService).sql index 430e6dfc89e3..567faffceb0b 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.12.Managed.LinqService).sql @@ -1,85 +1,70 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" < 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) +WHEN 1 = 1 THEN + INTO "Dest2" + ( + ID, + "Int" + ) + VALUES + ( + "source_ID" + 3, + "source_ID" + 1 + ) +SELECT + 42 as "source_N", + 1000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 1001 BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest2" - ( - ID Int NOT NULL, - "Int" Int NOT NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest2" x +WHERE + x.ID = 1003 diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.12.Managed.LinqService).sql index 430e6dfc89e3..362aee106b1d 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.12.Managed.LinqService).sql @@ -1,85 +1,65 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) + INTO "Dest2" + ( + ID, + "Int" + ) + VALUES + ( + "source_ID" + 3, + "source_ID" + 1 + ) +SELECT + 1000 as "source_ID", + 42 as "source_N" +FROM SYS.DUAL BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest2" - ( - ID Int NOT NULL, - "Int" Int NOT NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest2" x +WHERE + x.ID = 1003 diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.12.Managed.LinqService).sql index fb64c2ffa961..1261f430aa44 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.12.Managed.LinqService).sql @@ -1,43 +1,60 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT FIRST +WHEN "source_N" < 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) +ELSE + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 3, + "source_N" + ) +SELECT + 42 as "source_N", + 1000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 1003 diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.12.Managed.LinqService,null).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.12.Managed.LinqService,null).sql index fb64c2ffa961..89fb917ba221 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.12.Managed.LinqService,null).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.12.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2 -- String +SET @value = NULL -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.12.Managed.LinqService,one).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.12.Managed.LinqService,one).sql index fb64c2ffa961..ca88b0ae0c60 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.12.Managed.LinqService,one).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.12.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.12.Managed.LinqService,two).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.12.Managed.LinqService,two).sql index fb64c2ffa961..4649cab16f5a 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.12.Managed.LinqService,two).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.12.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.12.Managed.LinqService,null).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.12.Managed.LinqService,null).sql index fb64c2ffa961..83a6cc1a659d 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.12.Managed.LinqService,null).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.12.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2 -- String +SET @value = NULL +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.12.Managed.LinqService,one).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.12.Managed.LinqService,one).sql index fb64c2ffa961..433f2dd713d2 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.12.Managed.LinqService,one).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.12.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.12.Managed.LinqService,two).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.12.Managed.LinqService,two).sql index fb64c2ffa961..397228cbe290 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.12.Managed.LinqService,two).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.12.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.12.Managed.LinqService,null).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.12.Managed.LinqService,null).sql index fb64c2ffa961..d71bc6c70a8f 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.12.Managed.LinqService,null).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.12.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2 -- String +SET @value = NULL -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.12.Managed.LinqService,one).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.12.Managed.LinqService,one).sql index fb64c2ffa961..cd93fe9d57bd 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.12.Managed.LinqService,one).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.12.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.12.Managed.LinqService,two).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.12.Managed.LinqService,two).sql index fb64c2ffa961..0c3afd0bfe0b 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.12.Managed.LinqService,two).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.12.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.12.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..a619d339bdc4 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = ( + SELECT + p2_1."ParentID" + FROM + "Parent" p1_1 + INNER JOIN "Parent" p2_1 ON p1_1."ParentID" = p2_1."ParentID" + WHERE + p1_1."ParentID" < 3 AND "Parent"."ParentID" = p1_1."ParentID" AND + ("Parent"."Value1" = p1_1."Value1" OR "Parent"."Value1" IS NULL AND p1_1."Value1" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "Parent" p1 + INNER JOIN "Parent" p2 ON p1."ParentID" = p2."ParentID" + WHERE + p1."ParentID" < 3 AND "Parent"."ParentID" = p1."ParentID" AND + ("Parent"."Value1" = p1."Value1" OR "Parent"."Value1" IS NULL AND p1."Value1" IS NULL) + ) + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..283cb65bf698 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" p +SET + "ParentID" = p."ParentID" + 1 +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..283cb65bf698 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" p +SET + "ParentID" = p."ParentID" + 1 +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..481846024925 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +WHERE + EXISTS( + SELECT + * + FROM + "Child" c_1 + LEFT JOIN "Parent" a_Parent ON c_1."ParentID" = a_Parent."ParentID" + WHERE + c_1."ChildID" = :id AND + a_Parent."Value1" = 1 AND + "Child"."ParentID" = c_1."ParentID" AND + "Child"."ChildID" = c_1."ChildID" + ) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :p + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..a8fe4c7d1ffa --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" child_1 + LEFT JOIN "Parent" a_Parent ON child_1."ParentID" = a_Parent."ParentID" + WHERE + child_1."ChildID" = 10000 AND "Parent"."ParentID" = a_Parent."ParentID" AND + ("Parent"."Value1" = a_Parent."Value1" OR "Parent"."Value1" IS NULL AND a_Parent."Value1" IS NULL) + ) + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..a8fe4c7d1ffa --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" child_1 + LEFT JOIN "Parent" a_Parent ON child_1."ParentID" = a_Parent."ParentID" + WHERE + child_1."ChildID" = 10000 AND "Parent"."ParentID" = a_Parent."ParentID" AND + ("Parent"."Value1" = a_Parent."Value1" OR "Parent"."Value1" IS NULL AND a_Parent."Value1" IS NULL) + ) + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.12.Managed.LinqService).sql new file mode 100644 index 000000000000..df6ea72f9432 --- /dev/null +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.12.Managed.LinqService).sql @@ -0,0 +1,150 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Int32 +SET @ID = 1 + +UPDATE + "xxPerson_ol" t1 +SET + "FirstName" = :FirstName, + "LastName" = :LastName, + "MiddleName" = :MiddleName, + "Gender" = :Gender +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + diff --git a/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.12.Managed.LinqService).sql b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.12.Managed.LinqService).sql index 7a020eaa6e37..218d5ba194be 100644 --- a/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.12.Managed.LinqService).sql +++ b/Oracle.12.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.12.Managed.LinqService).sql @@ -38,3 +38,60 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + t1."PersonID" as ID, + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Gender Varchar2(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName Varchar2(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName Varchar2 -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName Varchar2(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int32 +SET @ID = 5 + +UPDATE + "Person" t1 +SET + "Gender" = :Gender, + "FirstName" = :Name_FirstName, + "MiddleName" = :Name_MiddleName, + "LastName" = :Name_LastName +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + t1."PersonID" as ID, + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.12.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.12.Managed).sql b/Oracle.12.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.12.Managed).sql new file mode 100644 index 000000000000..b1fd68013a47 --- /dev/null +++ b/Oracle.12.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.12.Managed).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.12.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.12.Managed).sql b/Oracle.12.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.12.Managed).sql new file mode 100644 index 000000000000..f0be695b8f14 --- /dev/null +++ b/Oracle.12.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.12.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.12.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.12.Managed).sql b/Oracle.12.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.12.Managed).sql new file mode 100644 index 000000000000..f0be695b8f14 --- /dev/null +++ b/Oracle.12.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.12.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.12.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + From 8e138dec7b8e672ef87032dc82daf0608a680ff7 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 21:09:56 +0000 Subject: [PATCH 24/40] [Linux / PostgreSQL 13] baselines --- ...s.All4Async(PostgreSQL.13.LinqService).sql | 13 + ...oupBy2Async(PostgreSQL.13.LinqService).sql | 30 ++ ...erable1Test(PostgreSQL.13.LinqService).sql | 9 + ...erable2Test(PostgreSQL.13.LinqService).sql | 11 + ...leCast1Test(PostgreSQL.13.LinqService).sql | 9 + ...leCast2Test(PostgreSQL.13.LinqService).sql | 11 + ...nsAsyncTest(PostgreSQL.13.LinqService).sql | 17 + ...stAsyncTest(PostgreSQL.13.LinqService).sql | 15 + ...akeSkipTest(PostgreSQL.13.LinqService).sql | 16 + ...stOrDefault(PostgreSQL.13.LinqService).sql | 20 + ...upAsyncTest(PostgreSQL.13.LinqService).sql | 21 + ...ntAsyncTest(PostgreSQL.13.LinqService).sql | 21 + ...nyTestAsync(PostgreSQL.13.LinqService).sql | 30 ++ ...yTestAsync2(PostgreSQL.13.LinqService).sql | 30 ++ ...oAsyncdTest(PostgreSQL.13.LinqService).sql | 16 + ...dTest3Async(PostgreSQL.13.LinqService).sql | 28 ++ ...nsTestAsync(PostgreSQL.13.LinqService).sql | 34 ++ ...ntTestAsync(PostgreSQL.13.LinqService).sql | 24 + ...tTestAsync2(PostgreSQL.13.LinqService).sql | 24 + ...tTestAsync1(PostgreSQL.13.LinqService).sql | 28 ++ ...tTestAsync2(PostgreSQL.13.LinqService).sql | 28 ++ ...axTestAsync(PostgreSQL.13.LinqService).sql | 24 + ...xTestAsync2(PostgreSQL.13.LinqService).sql | 24 + ...dicateAsync(PostgreSQL.13.LinqService).sql | 171 +------ ...dicateAsync(PostgreSQL.13.LinqService).sql | 168 +------ ...dicateAsync(PostgreSQL.13.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.13.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.13.LinqService).sql | 168 +------ ...lectorAsync(PostgreSQL.13.LinqService).sql | 168 +------ ...lectorAsync(PostgreSQL.13.LinqService).sql | 168 +------ ...dicateAsync(PostgreSQL.13.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.13.LinqService).sql | 170 +------ ...oncat1Async(PostgreSQL.13.LinqService).sql | 19 + ...rementAsync(PostgreSQL.13.LinqService).sql | 97 ++++ ...lteredAsync(PostgreSQL.13.LinqService).sql | 82 ++++ ...Count1Async(PostgreSQL.13.LinqService).sql | 8 + ...Count2Async(PostgreSQL.13.LinqService).sql | 10 + ...ryMax1Async(PostgreSQL.13.LinqService).sql | 16 + ...s.Issue4602(PostgreSQL.13.LinqService).sql | 48 +- ...e4057_Async(PostgreSQL.13.LinqService).sql | 31 ++ ...Transaction(PostgreSQL.13.LinqService).sql | 31 ++ ...essionAsync(PostgreSQL.13.LinqService).sql | 25 + ....Cast1Async(PostgreSQL.13.LinqService).sql | 11 + ...Test18Async(PostgreSQL.13.LinqService).sql | 14 + ...meter1Async(PostgreSQL.13.LinqService).sql | 6 + ...sue3132Test(PostgreSQL.13.LinqService).sql | 213 +++++++++ ...Async(PostgreSQL.13.LinqService,False).sql | 16 + ...2Async(PostgreSQL.13.LinqService,True).sql | 16 + ...Async(PostgreSQL.13.LinqService,False).sql | 16 + ...3Async(PostgreSQL.13.LinqService,True).sql | 16 + ...eSkip1Async(PostgreSQL.13.LinqService).sql | 83 +--- ...Async(PostgreSQL.13.LinqService,False).sql | 20 + ...1Async(PostgreSQL.13.LinqService,True).sql | 24 + ...Async(PostgreSQL.13.LinqService,False).sql | 12 + ...2Async(PostgreSQL.13.LinqService,True).sql | 12 + ...Async(PostgreSQL.13.LinqService,False).sql | 12 + ...3Async(PostgreSQL.13.LinqService,True).sql | 14 + ...Async(PostgreSQL.13.LinqService,False).sql | 12 + ...4Async(PostgreSQL.13.LinqService,True).sql | 14 + ...Async(PostgreSQL.13.LinqService,False).sql | 10 + ...5Async(PostgreSQL.13.LinqService,True).sql | 12 + ...eSQL.13.LinqService,False,False,False).sql | 16 + ...reSQL.13.LinqService,False,False,True).sql | 16 + ...reSQL.13.LinqService,False,True,False).sql | 16 + ...greSQL.13.LinqService,False,True,True).sql | 16 + ...reSQL.13.LinqService,True,False,False).sql | 16 + ...greSQL.13.LinqService,True,False,True).sql | 16 + ...greSQL.13.LinqService,True,True,False).sql | 16 + ...tgreSQL.13.LinqService,True,True,True).sql | 16 + ...Table1Async(PostgreSQL.13.LinqService).sql | 34 ++ ...eTableAsync(PostgreSQL.13.LinqService).sql | 30 ++ ...leNameAsync(PostgreSQL.13.LinqService).sql | 89 ++++ ...yncTest(PostgreSQL.13.LinqService,100).sql | 17 + ...yncTest(PostgreSQL.13.LinqService,200).sql | 17 + ...eRecord(PostgreSQL.13.LinqService,100).sql | 12 + ...eRecord(PostgreSQL.13.LinqService,200).sql | 12 + ...yncTest(PostgreSQL.13.LinqService,100).sql | 14 + ...yncTest(PostgreSQL.13.LinqService,200).sql | 14 + ...eRecord(PostgreSQL.13.LinqService,100).sql | 14 + ...eRecord(PostgreSQL.13.LinqService,200).sql | 14 + ...yncTest(PostgreSQL.13.LinqService,100).sql | 11 + ...yncTest(PostgreSQL.13.LinqService,200).sql | 11 + ...eRecord(PostgreSQL.13.LinqService,100).sql | 11 + ...eRecord(PostgreSQL.13.LinqService,200).sql | 11 + ...nsert2Async(PostgreSQL.13.LinqService).sql | 44 ++ ...nsert3Async(PostgreSQL.13.LinqService).sql | 46 ++ ...nsert4Async(PostgreSQL.13.LinqService).sql | 46 ++ ...leNameAsync(PostgreSQL.13.LinqService).sql | 69 +++ ...place1Async(PostgreSQL.13.LinqService).sql | 74 +++ ...leNameAsync(PostgreSQL.13.LinqService).sql | 117 +++++ ...pdate3Async(PostgreSQL.13.LinqService).sql | 74 +++ ...date3xAsync(PostgreSQL.13.LinqService).sql | 74 +++ ...ntity1Async(PostgreSQL.13.LinqService).sql | 15 + ...ntity2Async(PostgreSQL.13.LinqService).sql | 15 + ...ntity4Async(PostgreSQL.13.LinqService).sql | 34 ++ ...AsyncTest(PostgreSQL.13.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.13.LinqService,2).sql | 36 +- ...AsyncTest(PostgreSQL.13.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.13.LinqService,2).sql | 36 +- ...stAsync(PostgreSQL.13.LinqService,100).sql | 24 + ...stAsync(PostgreSQL.13.LinqService,200).sql | 24 + ...eRecord(PostgreSQL.13.LinqService,100).sql | 24 + ...eRecord(PostgreSQL.13.LinqService,200).sql | 24 + ...AsyncTest(PostgreSQL.13.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.13.LinqService,2).sql | 36 +- ...AsyncTest(PostgreSQL.13.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.13.LinqService,2).sql | 36 +- ...date12Async(PostgreSQL.13.LinqService).sql | 12 + ...pdate1Async(PostgreSQL.13.LinqService).sql | 54 +++ ...pdate2Async(PostgreSQL.13.LinqService).sql | 54 +++ ...pdate4Async(PostgreSQL.13.LinqService).sql | 55 +++ ...ation1Async(PostgreSQL.13.LinqService).sql | 40 ++ ...on1AsyncOld(PostgreSQL.13.LinqService).sql | 40 ++ ...leNameAsync(PostgreSQL.13.LinqService).sql | 107 +++++ ...mplex1Async(PostgreSQL.13.LinqService).sql | 57 +++ ...cWithoutOld(PostgreSQL.13.LinqService).sql | 449 +----------------- ...rnateUpdate(PostgreSQL.13.LinqService).sql | 448 +---------------- ...ingleRecord(PostgreSQL.13.LinqService).sql | 448 +---------------- ...cWithoutOld(PostgreSQL.13.LinqService).sql | 449 +----------------- ...rnateUpdate(PostgreSQL.13.LinqService).sql | 448 +---------------- ...ingleRecord(PostgreSQL.13.LinqService).sql | 448 +---------------- ...cWithoutOld(PostgreSQL.13.LinqService).sql | 227 +-------- ...ingleRecord(PostgreSQL.13.LinqService).sql | 227 +-------- ...cWithoutOld(PostgreSQL.13.LinqService).sql | 228 +-------- ...ingleRecord(PostgreSQL.13.LinqService).sql | 228 +-------- ...ts.Linq.AsyncTests.Test(PostgreSQL.13).sql | 18 + ...s.Linq.AsyncTests.Test1(PostgreSQL.13).sql | 9 + ....AsyncTests.TestForEach(PostgreSQL.13).sql | 9 + 128 files changed, 3271 insertions(+), 5121 deletions(-) create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.13.LinqService,False).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.13.LinqService,True).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.13.LinqService,False).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.13.LinqService,True).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.13.LinqService,False).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.13.LinqService,True).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.13.LinqService,False).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.13.LinqService,True).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.13.LinqService,False).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.13.LinqService,True).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.13.LinqService,False).sql create mode 100644 PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.13.LinqService,True).sql create mode 100644 PostgreSQL.13.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.13.LinqService).sql create mode 100644 PostgreSQL.13/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.13).sql create mode 100644 PostgreSQL.13/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.13).sql create mode 100644 PostgreSQL.13/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.13).sql diff --git a/PostgreSQL.13.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..9b0ec08849d4 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" <= 3 + ) + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..786b29d0fcc1 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT DISTINCT + "a_Parent1"."ParentID" + FROM + "Child" t1 + INNER JOIN "Parent" "a_Parent1" ON t1."ParentID" = "a_Parent1"."ParentID" + ) m_1 + INNER JOIN "Child" d + INNER JOIN "Parent" "a_Parent1_1" ON d."ParentID" = "a_Parent1_1"."ParentID" + ON m_1."ParentID" = "a_Parent1_1"."ParentID" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + "a_Parent1"."ParentID" +FROM + "Child" t1 + INNER JOIN "Parent" "a_Parent1" ON t1."ParentID" = "a_Parent1"."ParentID" +GROUP BY + "a_Parent1"."ParentID" + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..e5e76e0f2a8b --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.13.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..55c234a2182e --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.13.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..e5e76e0f2a8b --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.13.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..55c234a2182e --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.13.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..766ddf9bc126 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.13.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN :ID IN ( + SELECT + t1."PersonID" + FROM + "Person" t1 + ) + THEN True + ELSE False + END + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..a11ae711159d --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.13.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."PersonID" = 1 +LIMIT 1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.13.LinqService).sql index 5fe934a64fe0..b403bfbb2702 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.13.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY t1."ParentID" LIMIT :take OFFSET :skip +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 +DECLARE @skip Integer -- Int32 +SET @skip = 1 + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +ORDER BY + t1."ParentID" +LIMIT :take OFFSET :skip + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..901dc23f90bd --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.13.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer -- Int32 +SET @p_2 = 3 +DECLARE @param Integer -- Int32 +SET @param = 4 + +SELECT + o."ParentID", + o."Value1" +FROM + "Parent" o +WHERE + o."ParentID" IN (:p, :p_1, :p_2) OR o."ParentID" = :param +LIMIT 1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..5bba1e4ea581 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.13.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..5bba1e4ea581 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.13.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..d0978374853f --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.13.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..d0978374853f --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.13.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..146de864d78c --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.13.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = :p +ORDER BY + x."ParentID" DESC +LIMIT 1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..5c9954d75aa5 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT :p + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT :p + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..0d36ae0aa15a --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.13.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN True + ELSE False + END + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN True + ELSE False + END + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..8abcdec91603 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.13.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..8abcdec91603 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.13.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..7ed8496f698c --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.13.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..7ed8496f698c --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.13.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..39ae40d8b08e --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.13.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..39ae40d8b08e --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.13.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.13.LinqService).sql index 581743b8bdcb..4ef827d620c8 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.13.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + "AsyncDataTable" c_1 + WHERE + c_1."Id" = :p + ) diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.13.LinqService).sql index 581743b8bdcb..b3eec589cea8 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.13.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.13.LinqService).sql index 581743b8bdcb..3afcf9fe7725 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.13.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 1 diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.13.LinqService).sql index 581743b8bdcb..3afcf9fe7725 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.13.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 1 diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.13.LinqService).sql index 581743b8bdcb..b3eec589cea8 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.13.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.13.LinqService).sql index 581743b8bdcb..7ac34c334cfa 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.13.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MAX(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.13.LinqService).sql index 581743b8bdcb..6a20bb95d2c3 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.13.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MIN(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.13.LinqService).sql index 581743b8bdcb..232ce03fbda4 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.13.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 2 diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.13.LinqService).sql index 581743b8bdcb..232ce03fbda4 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.13.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 2 diff --git a/PostgreSQL.13.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..6f93ff1bdb4f --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" = 1 +UNION ALL +SELECT + p_1."ParentID", + p_1."Value1" +FROM + "Parent" p_1 +WHERE + p_1."ParentID" = 2 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.13.LinqService).sql index 8174a638fa53..b5aa7e6f5433 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.13.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value Text(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL diff --git a/PostgreSQL.13.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.13.LinqService).sql index 6846790fd55d..84cf560bd899 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.13.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value Text(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL SELECT @@ -8,6 +30,24 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" +SET + "Stamp" = "ConcurrencyFiltered"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyFiltered"."Id" = 2 AND "ConcurrencyFiltered"."Id" = :Id AND + "ConcurrencyFiltered"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL @@ -18,6 +58,24 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" +SET + "Stamp" = "ConcurrencyFiltered"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyFiltered"."Id" = 1 AND "ConcurrencyFiltered"."Id" = :Id AND + "ConcurrencyFiltered"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL @@ -28,6 +86,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL @@ -38,6 +108,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..73adaeca4e07 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" t1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..8004b3881dc4 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" > 2 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..3983afe76867 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" c_1 + LEFT JOIN "Parent" "a_Parent" ON c_1."ParentID" = "a_Parent"."ParentID" + WHERE + "a_Parent"."ParentID" = t1."ParentID" + )) +FROM + "Parent" t1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.13.LinqService).sql index 4ee27afb5eaf..af4874721981 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.13.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DynamicParent" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DynamicParent" -( - "ID" SERIAL NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY ("ID") -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DynamicChild" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DynamicChild" -( - "ID" SERIAL NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY ("ID") -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DynamicChild" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DynamicParent" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + it."ID" +FROM + "DynamicParent" it + LEFT JOIN "DynamicChild" "a_Child" ON it."ID" = "a_Child"."ParentID" +WHERE + "a_Child"."ID" = 123 diff --git a/PostgreSQL.13.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.13.LinqService).sql index 4c7d5fe49044..0df4b143de70 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.13.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + LIMIT 1 + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) diff --git a/PostgreSQL.13.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.13.LinqService).sql index 2c2cd5d67274..74f72e39b965 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.13.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + LIMIT 1 + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) diff --git a/PostgreSQL.13.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..1326a04f90e0 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.13.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" "a_Children" + INNER JOIN "GrandChild" "a_GrandChildren" ON "a_Children"."ParentID" = "a_GrandChildren"."ParentID" AND "a_Children"."ChildID" = "a_GrandChildren"."ChildID" + WHERE + p."ParentID" = "a_Children"."ParentID" + ) +FROM + "Parent" p + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..1ee640262d19 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +WHERE + t1."Value1" = 1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..6d253367ee17 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT DISTINCT + p1."PersonID", + p1."Gender", + p1."FirstName", + p1."LastName" +FROM + "Person" p1 +WHERE + p1."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + p1."Gender" = 'F' + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..8c08e73bc4fa --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + 1 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..da3923b579b0 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.13.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + x."MiddleName", + COUNT(*) +FROM + "Person" x +WHERE + x."MiddleName" IS NOT NULL +GROUP BY + x."MiddleName" +UNION ALL +SELECT + x_1."MiddleName", + COUNT(*) +FROM + "Person" x_1 +WHERE + x_1."MiddleName" IS NOT NULL +GROUP BY + x_1."MiddleName" +UNION ALL +SELECT + x_2."MiddleName", + COUNT(*) +FROM + "Person" x_2 +WHERE + x_2."MiddleName" IS NOT NULL +GROUP BY + x_2."MiddleName" +UNION ALL +SELECT + x_3."MiddleName", + COUNT(*) +FROM + "Person" x_3 +WHERE + x_3."MiddleName" IS NOT NULL +GROUP BY + x_3."MiddleName" +UNION ALL +SELECT + x_4."MiddleName", + COUNT(*) +FROM + "Person" x_4 +WHERE + x_4."MiddleName" IS NOT NULL +GROUP BY + x_4."MiddleName" +UNION ALL +SELECT + x_5."MiddleName", + COUNT(*) +FROM + "Person" x_5 +WHERE + x_5."MiddleName" IS NOT NULL +GROUP BY + x_5."MiddleName" +UNION ALL +SELECT + x_6."MiddleName", + COUNT(*) +FROM + "Person" x_6 +WHERE + x_6."MiddleName" IS NOT NULL +GROUP BY + x_6."MiddleName" +UNION ALL +SELECT + x_7."MiddleName", + COUNT(*) +FROM + "Person" x_7 +WHERE + x_7."MiddleName" IS NOT NULL +GROUP BY + x_7."MiddleName" +UNION ALL +SELECT + x_8."MiddleName", + COUNT(*) +FROM + "Person" x_8 +WHERE + x_8."MiddleName" IS NOT NULL +GROUP BY + x_8."MiddleName" +UNION ALL +SELECT + x_9."MiddleName", + COUNT(*) +FROM + "Person" x_9 +WHERE + x_9."MiddleName" IS NOT NULL +GROUP BY + x_9."MiddleName" +UNION ALL +SELECT + x_10."MiddleName", + COUNT(*) +FROM + "Person" x_10 +WHERE + x_10."MiddleName" IS NOT NULL +GROUP BY + x_10."MiddleName" +UNION ALL +SELECT + x_11."MiddleName", + COUNT(*) +FROM + "Person" x_11 +WHERE + x_11."MiddleName" IS NOT NULL +GROUP BY + x_11."MiddleName" +UNION ALL +SELECT + x_12."MiddleName", + COUNT(*) +FROM + "Person" x_12 +WHERE + x_12."MiddleName" IS NOT NULL +GROUP BY + x_12."MiddleName" +UNION ALL +SELECT + x_13."MiddleName", + COUNT(*) +FROM + "Person" x_13 +WHERE + x_13."MiddleName" IS NOT NULL +GROUP BY + x_13."MiddleName" +UNION ALL +SELECT + x_14."MiddleName", + COUNT(*) +FROM + "Person" x_14 +WHERE + x_14."MiddleName" IS NOT NULL +GROUP BY + x_14."MiddleName" +UNION ALL +SELECT + x_15."MiddleName", + COUNT(*) +FROM + "Person" x_15 +WHERE + x_15."MiddleName" IS NOT NULL +GROUP BY + x_15."MiddleName" +UNION ALL +SELECT + x_16."MiddleName", + COUNT(*) +FROM + "Person" x_16 +WHERE + x_16."MiddleName" IS NOT NULL +GROUP BY + x_16."MiddleName" +UNION ALL +SELECT + x_17."MiddleName", + COUNT(*) +FROM + "Person" x_17 +WHERE + x_17."MiddleName" IS NOT NULL +GROUP BY + x_17."MiddleName" +UNION ALL +SELECT + x_18."MiddleName", + COUNT(*) +FROM + "Person" x_18 +WHERE + x_18."MiddleName" IS NOT NULL +GROUP BY + x_18."MiddleName" +UNION ALL +SELECT + x_19."MiddleName", + COUNT(*) +FROM + "Person" x_19 +WHERE + x_19."MiddleName" IS NOT NULL +GROUP BY + x_19."MiddleName" +UNION ALL +SELECT + x_20."MiddleName", + COUNT(*) +FROM + "Person" x_20 +WHERE + x_20."MiddleName" IS NOT NULL +GROUP BY + x_20."MiddleName" + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.13.LinqService,False).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.13.LinqService,False).sql new file mode 100644 index 000000000000..74c53528ebc8 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.13.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.13.LinqService,True).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.13.LinqService,True).sql new file mode 100644 index 000000000000..74c53528ebc8 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.13.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.13.LinqService,False).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.13.LinqService,False).sql new file mode 100644 index 000000000000..74c53528ebc8 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.13.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.13.LinqService,True).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.13.LinqService,True).sql new file mode 100644 index 000000000000..74c53528ebc8 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.13.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.13.LinqService).sql index 5f3330933684..f06b594fa53f 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.13.LinqService).sql @@ -1,74 +1,13 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TakeSkipClass" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TakeSkipClass" -( - "Value" VarChar(10) NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TakeSkipClass" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @skip Integer -- Int32 +SET @skip = 3 + +SELECT + t1."Value" +FROM + "TakeSkipClass" t1 +ORDER BY + t1."Value" +OFFSET :skip diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.13.LinqService,False).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.13.LinqService,False).sql index 1771f55f2f08..3b7542beb128 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.13.LinqService,False).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.13.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" ch LIMIT 3 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT 2 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT 3 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.13.LinqService,True).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.13.LinqService,True).sql index 585ab8b9b188..6cadb381fdfb 100644 --- a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.13.LinqService,True).sql +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.13.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" ch LIMIT :take +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT :take + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT :take + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.13.LinqService,False).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.13.LinqService,False).sql new file mode 100644 index 000000000000..da4ee08a8d02 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.13.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :n + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.13.LinqService,True).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.13.LinqService,True).sql new file mode 100644 index 000000000000..da4ee08a8d02 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.13.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :n + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.13.LinqService,False).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.13.LinqService,False).sql new file mode 100644 index 000000000000..d31586935e33 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.13.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +LIMIT 3 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.13.LinqService,True).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.13.LinqService,True).sql new file mode 100644 index 000000000000..4f9c69a68348 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.13.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +LIMIT :take + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.13.LinqService,False).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.13.LinqService,False).sql new file mode 100644 index 000000000000..207e3d1398c8 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.13.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +LIMIT 3 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.13.LinqService,True).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.13.LinqService,True).sql new file mode 100644 index 000000000000..7b2032e72bee --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.13.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +LIMIT :take + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.13.LinqService,False).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.13.LinqService,False).sql new file mode 100644 index 000000000000..ff953d5faed1 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.13.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT 3 + diff --git a/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.13.LinqService,True).sql b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.13.LinqService,True).sql new file mode 100644 index 000000000000..c9a4ca8b7a6e --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.13.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :take + diff --git a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,False,False).sql b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,False,False).sql index cd28108206a3..a42b7d0d4354 100644 --- a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,False,False).sql +++ b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,False,True).sql b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,False,True).sql index 24b97fb3f26b..18145b8012c1 100644 --- a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,False,True).sql +++ b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,False,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,True,False).sql b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,True,False).sql index 075574c0cb31..f68489b972d1 100644 --- a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,True,False).sql +++ b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,True,True).sql b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,True,True).sql index 02e407c21ab7..269c4e684f6e 100644 --- a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,True,True).sql +++ b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,False,True,True).sql @@ -21,3 +21,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE testdata.public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,False,False).sql b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,False,False).sql index cd28108206a3..a42b7d0d4354 100644 --- a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,False,False).sql +++ b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,False,True).sql b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,False,True).sql index 24b97fb3f26b..18145b8012c1 100644 --- a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,False,True).sql +++ b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,False,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,True,False).sql b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,True,False).sql index 075574c0cb31..f68489b972d1 100644 --- a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,True,False).sql +++ b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,True,True).sql b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,True,True).sql index 02e407c21ab7..269c4e684f6e 100644 --- a/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,True,True).sql +++ b/PostgreSQL.13.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.13.LinqService,True,True,True).sql @@ -21,3 +21,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE testdata.public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..139c5b2c31fa --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TestTable" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "TestTable" +( + "ID" SERIAL NOT NULL, + "Field1" text NULL, + "Field2" text NULL, + "CreatedOn" TimeStamp NULL, + + CONSTRAINT "PK_TestTable" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ID", + t1."Field1", + t1."Field2", + t1."CreatedOn" +FROM + "TestTable" t1 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE "TestTable" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.13.LinqService).sql index 72ba71da1685..e03083773a3d 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.13.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TempTable" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE IF NOT EXISTS "TempTable" +( + "ID" Int NOT NULL +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +INSERT INTO "TempTable" +( + "ID" +) +SELECT + p."ParentID" +FROM + "Parent" p + +BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL SELECT @@ -7,3 +32,8 @@ FROM "Parent" p INNER JOIN "TempTable" t ON p."ParentID" = t."ID" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TempTable" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..433837d80662 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.13.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson" t1 +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.13.LinqService,100).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.13.LinqService,100).sql index 6b61594ad3cf..7668fd40ac01 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.13.LinqService,100).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.13.LinqService,100).sql @@ -10,3 +10,20 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TableWithData" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.13.LinqService,200).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.13.LinqService,200).sql index 6b61594ad3cf..7668fd40ac01 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.13.LinqService,200).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.13.LinqService,200).sql @@ -10,3 +10,20 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TableWithData" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.13.LinqService,100).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.13.LinqService,100).sql index 0b97f4b70c6c..19886732862d 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.13.LinqService,100).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.13.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.13.LinqService,200).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.13.LinqService,200).sql index 0b97f4b70c6c..19886732862d 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.13.LinqService,200).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.13.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.13.LinqService,100).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.13.LinqService,100).sql index 6b61594ad3cf..8e899a4a5ac4 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.13.LinqService,100).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.13.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.13.LinqService,200).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.13.LinqService,200).sql index 6b61594ad3cf..9d43d315f31a 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.13.LinqService,200).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.13.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,100).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,100).sql index 0b97f4b70c6c..10510311f3bb 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,100).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,200).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,200).sql index 0b97f4b70c6c..852a24f7052e 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,200).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.13.LinqService,100).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.13.LinqService,100).sql index 6b61594ad3cf..816474d5ac57 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.13.LinqService,100).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.13.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.13.LinqService,200).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.13.LinqService,200).sql index 6b61594ad3cf..816474d5ac57 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.13.LinqService,200).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.13.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,100).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,100).sql index 0b97f4b70c6c..b576adafc7ad 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,100).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,200).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,200).sql index 0b97f4b70c6c..b576adafc7ad 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,200).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.13.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..2d8493380c36 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..649e929c557f --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..649e929c557f --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.13.LinqService).sql index 9e76a54ea6eb..9061d008dc87 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.13.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) DECLARE @FirstName Text(6) -- String SET @FirstName = 'Steven' DECLARE @LastName Text(4) -- String @@ -54,3 +94,32 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" p +WHERE + p."FirstName" = 'Steven' AND p."LastName" = 'King' AND + p."Gender" = 'M' + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.13.LinqService).sql index 50e1487eb723..efc178689857 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.13.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..89c3c62f8420 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.13.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPatient" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "xxPatient" +( + "PersonID" Int NOT NULL, + "Diagnosis" text NULL, + + CONSTRAINT "PK_xxPatient" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPatient" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.13.LinqService).sql index 50e1487eb723..85730255bfe2 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.13.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.13.LinqService).sql index 50e1487eb723..85730255bfe2 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.13.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.13.LinqService).sql index 8232cbcb7b66..2a64853ec896 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.13.LinqService).sql @@ -24,6 +24,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.13.LinqService).sql index 8232cbcb7b66..2a64853ec896 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.13.LinqService).sql @@ -24,6 +24,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.13.LinqService).sql index a3cc9ca4dc9c..bec98672dcc7 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.13.LinqService).sql @@ -34,6 +34,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Text(5) -- String +SET @p = 'John0' + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) DECLARE @FirstName Text(5) -- String @@ -62,6 +79,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Text(5) -- String +SET @p = 'John1' + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.13.LinqService,1).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.13.LinqService,1).sql index 20cca955947c..b4c78673e857 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.13.LinqService,1).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.13.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :Id, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.13.LinqService,2).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.13.LinqService,2).sql index 20cca955947c..5c4ff7dcc21c 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.13.LinqService,2).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.13.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :Id, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,1).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,1).sql index 20cca955947c..b9bd298536c7 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,1).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,2).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,2).sql index 20cca955947c..89f680b626cb 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,2).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.13.LinqService,100).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.13.LinqService,100).sql index 6d694d573be4..9a166fbeb047 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.13.LinqService,100).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.13.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.13.LinqService,200).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.13.LinqService,200).sql index 844b7601c98a..32e545e55ade 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.13.LinqService,200).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.13.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.13.LinqService,100).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.13.LinqService,100).sql index 03df6732d3e5..0c32efbe451e 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.13.LinqService,100).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.13.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.13.LinqService,200).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.13.LinqService,200).sql index 0859797fca5e..770bef579fde 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.13.LinqService,200).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.13.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.13.LinqService,1).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.13.LinqService,1).sql index 20cca955947c..4d6e9dd94fad 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.13.LinqService,1).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.13.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Id", + "Value", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Id, + :Value, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.13.LinqService,2).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.13.LinqService,2).sql index 20cca955947c..84cb7fef409d 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.13.LinqService,2).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.13.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Id", + "Value", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Id, + :Value, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,1).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,1).sql index 20cca955947c..b9bd298536c7 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,1).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,2).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,2).sql index 20cca955947c..89f680b626cb 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,2).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.13.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..f878c94dc3fb --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = p2."ParentID" +FROM + "Parent" p2 +WHERE + "Parent"."ParentID" < 3 AND "Parent"."ParentID" = p2."ParentID" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..0d16d43d8958 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" +SET + "ParentID" = "Parent"."ParentID" + 1 +WHERE + "Parent"."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..0d16d43d8958 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" +SET + "ParentID" = "Parent"."ParentID" + 1 +WHERE + "Parent"."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..aad6cf767ad5 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +FROM + "Parent" "a_Parent" +WHERE + "Child"."ChildID" = :id AND "a_Parent"."Value1" = 1 AND + "Child"."ParentID" = "a_Parent"."ParentID" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :p + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..612a6dc1eb65 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.13.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +FROM + "Child" child_1 +WHERE + child_1."ChildID" = 10000 AND child_1."ParentID" = "Parent"."ParentID" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..612a6dc1eb65 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.13.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +FROM + "Child" child_1 +WHERE + child_1."ChildID" = 10000 AND child_1."ParentID" = "Parent"."ParentID" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.13.LinqService).sql new file mode 100644 index 000000000000..937230340687 --- /dev/null +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.13.LinqService).sql @@ -0,0 +1,107 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +UPDATE + "xxPerson" +SET + "FirstName" = :FirstName, + "LastName" = :LastName, + "MiddleName" = :MiddleName, + "Gender" = :Gender +WHERE + "xxPerson"."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.13.LinqService).sql index e2a610ce9736..dbf80a8f6ea0 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.13.LinqService).sql @@ -31,3 +31,60 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + t1."PersonID", + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +LIMIT 1 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @Gender Text(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName Text(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName Text -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName Text(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer -- Int32 +SET @ID = 5 + +UPDATE + "Person" +SET + "Gender" = :Gender, + "FirstName" = :Name_FirstName, + "MiddleName" = :Name_MiddleName, + "LastName" = :Name_LastName +WHERE + "Person"."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + t1."PersonID", + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +LIMIT 1 + diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql index 573b403be29c..5e346159c029 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql @@ -1,436 +1,17 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + s."ValueStr", + "DestinationTable"."Value" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.13.LinqService).sql index 573b403be29c..6eb5dea4e851 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.13.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.13.LinqService).sql index 573b403be29c..5df459c50364 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.13.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = t1."Id", + "Value" = t1."Value", + "ValueStr" = t1."ValueStr" +FROM + "TableWithData" t1 +WHERE + t1."Id" = 3 AND "DestinationTable"."Id" = t1."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql index 573b403be29c..5e346159c029 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql @@ -1,436 +1,17 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + s."ValueStr", + "DestinationTable"."Value" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.13.LinqService).sql index 573b403be29c..6eb5dea4e851 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.13.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.13.LinqService).sql index 573b403be29c..5df459c50364 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.13.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = t1."Id", + "Value" = t1."Value", + "ValueStr" = t1."ValueStr" +FROM + "TableWithData" t1 +WHERE + t1."Id" = 3 AND "DestinationTable"."Id" = t1."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql index dcc7669602e3..66b15667dcff 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" > 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.13.LinqService).sql index dcc7669602e3..d808a313d8a4 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.13.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" = 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql index dcc7669602e3..5dc233898647 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.13.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Id" = "TableWithData"."Id", + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" > 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.13.LinqService).sql b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.13.LinqService).sql index dcc7669602e3..c0e74039609f 100644 --- a/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.13.LinqService).sql +++ b/PostgreSQL.13.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.13.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Id" = "TableWithData"."Id", + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" = 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.13/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.13).sql b/PostgreSQL.13/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.13).sql new file mode 100644 index 000000000000..255f7b831e7a --- /dev/null +++ b/PostgreSQL.13/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.13).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.13/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.13).sql b/PostgreSQL.13/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.13).sql new file mode 100644 index 000000000000..e5e76e0f2a8b --- /dev/null +++ b/PostgreSQL.13/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.13).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.13/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.13).sql b/PostgreSQL.13/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.13).sql new file mode 100644 index 000000000000..e5e76e0f2a8b --- /dev/null +++ b/PostgreSQL.13/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.13).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.13 PostgreSQL.9.5 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + From f02f8425c43421705326ce7f76b78dd4d4cb7039 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 21:12:05 +0000 Subject: [PATCH 25/40] [Linux / PostgreSQL 15] baselines --- ...s.All4Async(PostgreSQL.15.LinqService).sql | 13 + ...oupBy2Async(PostgreSQL.15.LinqService).sql | 30 ++ ...erable1Test(PostgreSQL.15.LinqService).sql | 9 + ...erable2Test(PostgreSQL.15.LinqService).sql | 11 + ...leCast1Test(PostgreSQL.15.LinqService).sql | 9 + ...leCast2Test(PostgreSQL.15.LinqService).sql | 11 + ...nsAsyncTest(PostgreSQL.15.LinqService).sql | 17 + ...stAsyncTest(PostgreSQL.15.LinqService).sql | 15 + ...akeSkipTest(PostgreSQL.15.LinqService).sql | 16 + ...stOrDefault(PostgreSQL.15.LinqService).sql | 20 + ...upAsyncTest(PostgreSQL.15.LinqService).sql | 21 + ...ntAsyncTest(PostgreSQL.15.LinqService).sql | 21 + ...nyTestAsync(PostgreSQL.15.LinqService).sql | 30 ++ ...yTestAsync2(PostgreSQL.15.LinqService).sql | 30 ++ ...oAsyncdTest(PostgreSQL.15.LinqService).sql | 16 + ...dTest3Async(PostgreSQL.15.LinqService).sql | 28 ++ ...nsTestAsync(PostgreSQL.15.LinqService).sql | 34 ++ ...ntTestAsync(PostgreSQL.15.LinqService).sql | 24 + ...tTestAsync2(PostgreSQL.15.LinqService).sql | 24 + ...tTestAsync1(PostgreSQL.15.LinqService).sql | 28 ++ ...tTestAsync2(PostgreSQL.15.LinqService).sql | 28 ++ ...axTestAsync(PostgreSQL.15.LinqService).sql | 24 + ...xTestAsync2(PostgreSQL.15.LinqService).sql | 24 + ...dicateAsync(PostgreSQL.15.LinqService).sql | 171 +------ ...dicateAsync(PostgreSQL.15.LinqService).sql | 168 +------ ...dicateAsync(PostgreSQL.15.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.15.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.15.LinqService).sql | 168 +------ ...lectorAsync(PostgreSQL.15.LinqService).sql | 168 +------ ...lectorAsync(PostgreSQL.15.LinqService).sql | 168 +------ ...dicateAsync(PostgreSQL.15.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.15.LinqService).sql | 170 +------ ...oncat1Async(PostgreSQL.15.LinqService).sql | 19 + ...rementAsync(PostgreSQL.15.LinqService).sql | 97 ++++ ...lteredAsync(PostgreSQL.15.LinqService).sql | 82 ++++ ...Count1Async(PostgreSQL.15.LinqService).sql | 8 + ...Count2Async(PostgreSQL.15.LinqService).sql | 10 + ...ryMax1Async(PostgreSQL.15.LinqService).sql | 16 + ...s.Issue4602(PostgreSQL.15.LinqService).sql | 48 +- ...e4057_Async(PostgreSQL.15.LinqService).sql | 31 ++ ...Transaction(PostgreSQL.15.LinqService).sql | 31 ++ ...essionAsync(PostgreSQL.15.LinqService).sql | 25 + ....Cast1Async(PostgreSQL.15.LinqService).sql | 11 + ...Test18Async(PostgreSQL.15.LinqService).sql | 14 + ...meter1Async(PostgreSQL.15.LinqService).sql | 6 + ...sue3132Test(PostgreSQL.15.LinqService).sql | 213 +++++++++ ...Async(PostgreSQL.15.LinqService,False).sql | 16 + ...2Async(PostgreSQL.15.LinqService,True).sql | 16 + ...Async(PostgreSQL.15.LinqService,False).sql | 16 + ...3Async(PostgreSQL.15.LinqService,True).sql | 16 + ...eSkip1Async(PostgreSQL.15.LinqService).sql | 83 +--- ...Async(PostgreSQL.15.LinqService,False).sql | 20 + ...1Async(PostgreSQL.15.LinqService,True).sql | 24 + ...Async(PostgreSQL.15.LinqService,False).sql | 12 + ...2Async(PostgreSQL.15.LinqService,True).sql | 12 + ...Async(PostgreSQL.15.LinqService,False).sql | 12 + ...3Async(PostgreSQL.15.LinqService,True).sql | 14 + ...Async(PostgreSQL.15.LinqService,False).sql | 12 + ...4Async(PostgreSQL.15.LinqService,True).sql | 14 + ...Async(PostgreSQL.15.LinqService,False).sql | 10 + ...5Async(PostgreSQL.15.LinqService,True).sql | 12 + ...eSQL.15.LinqService,False,False,False).sql | 16 + ...reSQL.15.LinqService,False,False,True).sql | 16 + ...reSQL.15.LinqService,False,True,False).sql | 16 + ...greSQL.15.LinqService,False,True,True).sql | 16 + ...reSQL.15.LinqService,True,False,False).sql | 16 + ...greSQL.15.LinqService,True,False,True).sql | 16 + ...greSQL.15.LinqService,True,True,False).sql | 16 + ...tgreSQL.15.LinqService,True,True,True).sql | 16 + ...Table1Async(PostgreSQL.15.LinqService).sql | 34 ++ ...eTableAsync(PostgreSQL.15.LinqService).sql | 30 ++ ...leNameAsync(PostgreSQL.15.LinqService).sql | 89 ++++ ...yncTest(PostgreSQL.15.LinqService,100).sql | 17 + ...yncTest(PostgreSQL.15.LinqService,200).sql | 17 + ...eRecord(PostgreSQL.15.LinqService,100).sql | 12 + ...eRecord(PostgreSQL.15.LinqService,200).sql | 12 + ...yncTest(PostgreSQL.15.LinqService,100).sql | 14 + ...yncTest(PostgreSQL.15.LinqService,200).sql | 14 + ...eRecord(PostgreSQL.15.LinqService,100).sql | 14 + ...eRecord(PostgreSQL.15.LinqService,200).sql | 14 + ...yncTest(PostgreSQL.15.LinqService,100).sql | 11 + ...yncTest(PostgreSQL.15.LinqService,200).sql | 11 + ...eRecord(PostgreSQL.15.LinqService,100).sql | 11 + ...eRecord(PostgreSQL.15.LinqService,200).sql | 11 + ...nsert2Async(PostgreSQL.15.LinqService).sql | 44 ++ ...nsert3Async(PostgreSQL.15.LinqService).sql | 46 ++ ...nsert4Async(PostgreSQL.15.LinqService).sql | 46 ++ ...leNameAsync(PostgreSQL.15.LinqService).sql | 69 +++ ...place1Async(PostgreSQL.15.LinqService).sql | 74 +++ ...leNameAsync(PostgreSQL.15.LinqService).sql | 117 +++++ ...pdate3Async(PostgreSQL.15.LinqService).sql | 74 +++ ...date3xAsync(PostgreSQL.15.LinqService).sql | 74 +++ ...ntity1Async(PostgreSQL.15.LinqService).sql | 15 + ...ntity2Async(PostgreSQL.15.LinqService).sql | 15 + ...ntity4Async(PostgreSQL.15.LinqService).sql | 34 ++ ...AsyncTest(PostgreSQL.15.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.15.LinqService,2).sql | 36 +- ...AsyncTest(PostgreSQL.15.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.15.LinqService,2).sql | 36 +- ...stAsync(PostgreSQL.15.LinqService,100).sql | 24 + ...stAsync(PostgreSQL.15.LinqService,200).sql | 24 + ...eRecord(PostgreSQL.15.LinqService,100).sql | 24 + ...eRecord(PostgreSQL.15.LinqService,200).sql | 24 + ...AsyncTest(PostgreSQL.15.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.15.LinqService,2).sql | 36 +- ...AsyncTest(PostgreSQL.15.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.15.LinqService,2).sql | 36 +- ...omQueryAsyn(PostgreSQL.15.LinqService).sql | 39 ++ ...omTableAsyn(PostgreSQL.15.LinqService).sql | 37 ++ ...date12Async(PostgreSQL.15.LinqService).sql | 12 + ...pdate1Async(PostgreSQL.15.LinqService).sql | 54 +++ ...pdate2Async(PostgreSQL.15.LinqService).sql | 54 +++ ...pdate4Async(PostgreSQL.15.LinqService).sql | 55 +++ ...ation1Async(PostgreSQL.15.LinqService).sql | 40 ++ ...on1AsyncOld(PostgreSQL.15.LinqService).sql | 40 ++ ...leNameAsync(PostgreSQL.15.LinqService).sql | 107 +++++ ...mplex1Async(PostgreSQL.15.LinqService).sql | 57 +++ ...cWithoutOld(PostgreSQL.15.LinqService).sql | 449 +----------------- ...rnateUpdate(PostgreSQL.15.LinqService).sql | 448 +---------------- ...ingleRecord(PostgreSQL.15.LinqService).sql | 448 +---------------- ...cWithoutOld(PostgreSQL.15.LinqService).sql | 449 +----------------- ...rnateUpdate(PostgreSQL.15.LinqService).sql | 448 +---------------- ...ingleRecord(PostgreSQL.15.LinqService).sql | 448 +---------------- ...cWithoutOld(PostgreSQL.15.LinqService).sql | 227 +-------- ...ingleRecord(PostgreSQL.15.LinqService).sql | 227 +-------- ...cWithoutOld(PostgreSQL.15.LinqService).sql | 228 +-------- ...ingleRecord(PostgreSQL.15.LinqService).sql | 228 +-------- ...ts.Linq.AsyncTests.Test(PostgreSQL.15).sql | 18 + ...s.Linq.AsyncTests.Test1(PostgreSQL.15).sql | 9 + ....AsyncTests.TestForEach(PostgreSQL.15).sql | 9 + 130 files changed, 3347 insertions(+), 5121 deletions(-) create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.15.LinqService,False).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.15.LinqService,True).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.15.LinqService,False).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.15.LinqService,True).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.15.LinqService,False).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.15.LinqService,True).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.15.LinqService,False).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.15.LinqService,True).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.15.LinqService,False).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.15.LinqService,True).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.15.LinqService,False).sql create mode 100644 PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.15.LinqService,True).sql create mode 100644 PostgreSQL.15.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.15.LinqService).sql create mode 100644 PostgreSQL.15/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.15).sql create mode 100644 PostgreSQL.15/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.15).sql create mode 100644 PostgreSQL.15/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.15).sql diff --git a/PostgreSQL.15.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..5f49a3628635 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" <= 3 + ) + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..1481f7aa52c5 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT DISTINCT + "a_Parent1"."ParentID" + FROM + "Child" t1 + INNER JOIN "Parent" "a_Parent1" ON t1."ParentID" = "a_Parent1"."ParentID" + ) m_1 + INNER JOIN "Child" d + INNER JOIN "Parent" "a_Parent1_1" ON d."ParentID" = "a_Parent1_1"."ParentID" + ON m_1."ParentID" = "a_Parent1_1"."ParentID" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + "a_Parent1"."ParentID" +FROM + "Child" t1 + INNER JOIN "Parent" "a_Parent1" ON t1."ParentID" = "a_Parent1"."ParentID" +GROUP BY + "a_Parent1"."ParentID" + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..814f793144e3 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.15.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..6c54892fc6f4 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.15.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..814f793144e3 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.15.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..6c54892fc6f4 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.15.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..f946f4bbedd3 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.15.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN :ID IN ( + SELECT + t1."PersonID" + FROM + "Person" t1 + ) + THEN True + ELSE False + END + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..270a42259dc9 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.15.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."PersonID" = 1 +LIMIT 1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.15.LinqService).sql index a417d211952b..1c58e2bd53af 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.15.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY t1."ParentID" LIMIT :take OFFSET :skip +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 +DECLARE @skip Integer -- Int32 +SET @skip = 1 + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +ORDER BY + t1."ParentID" +LIMIT :take OFFSET :skip + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..e42a28f174ed --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.15.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer -- Int32 +SET @p_2 = 3 +DECLARE @param Integer -- Int32 +SET @param = 4 + +SELECT + o."ParentID", + o."Value1" +FROM + "Parent" o +WHERE + o."ParentID" IN (:p, :p_1, :p_2) OR o."ParentID" = :param +LIMIT 1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..a5861bc7c186 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.15.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..a5861bc7c186 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.15.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..f9f939a896ef --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.15.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..f9f939a896ef --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.15.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..73a36f296e23 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.15.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = :p +ORDER BY + x."ParentID" DESC +LIMIT 1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..50656ec696ef --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT :p + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT :p + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..f8a150401af5 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.15.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN True + ELSE False + END + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN True + ELSE False + END + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..572f8a0d94ca --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.15.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..572f8a0d94ca --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.15.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..9ee220ef85ef --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.15.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..9ee220ef85ef --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.15.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..13978d95ad20 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.15.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..13978d95ad20 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.15.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.15.LinqService).sql index bf2d94756ce1..a0e9f41b399c 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.15.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + "AsyncDataTable" c_1 + WHERE + c_1."Id" = :p + ) diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.15.LinqService).sql index bf2d94756ce1..f16fc46f299e 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.15.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.15.LinqService).sql index bf2d94756ce1..7615ac7500d8 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.15.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 1 diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.15.LinqService).sql index bf2d94756ce1..7615ac7500d8 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.15.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 1 diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.15.LinqService).sql index bf2d94756ce1..f16fc46f299e 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.15.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.15.LinqService).sql index bf2d94756ce1..4f72cb423b04 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.15.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MAX(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.15.LinqService).sql index bf2d94756ce1..9d2af46327bd 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.15.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MIN(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.15.LinqService).sql index bf2d94756ce1..2b27dde84f70 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.15.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 2 diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.15.LinqService).sql index bf2d94756ce1..2b27dde84f70 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.15.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 2 diff --git a/PostgreSQL.15.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..9d4ce9a278d6 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" = 1 +UNION ALL +SELECT + p_1."ParentID", + p_1."Value1" +FROM + "Parent" p_1 +WHERE + p_1."ParentID" = 2 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.15.LinqService).sql index 3f4709a0269b..94849b1805be 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.15.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value Text(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- PostgreSQL.15 PostgreSQL SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.15 PostgreSQL @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.15 PostgreSQL @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.15 PostgreSQL @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.15 PostgreSQL @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.15.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.15.LinqService).sql index 08f67f9962f9..279b4f6e50b2 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.15.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value Text(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- PostgreSQL.15 PostgreSQL SELECT @@ -8,6 +30,24 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" +SET + "Stamp" = "ConcurrencyFiltered"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyFiltered"."Id" = 2 AND "ConcurrencyFiltered"."Id" = :Id AND + "ConcurrencyFiltered"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.15 PostgreSQL @@ -18,6 +58,24 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" +SET + "Stamp" = "ConcurrencyFiltered"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyFiltered"."Id" = 1 AND "ConcurrencyFiltered"."Id" = :Id AND + "ConcurrencyFiltered"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.15 PostgreSQL @@ -28,6 +86,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.15 PostgreSQL @@ -38,6 +108,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..be1b7ff2f67f --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" t1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..3b914e84a7e8 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" > 2 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..14a1c2c40e7b --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" c_1 + LEFT JOIN "Parent" "a_Parent" ON c_1."ParentID" = "a_Parent"."ParentID" + WHERE + "a_Parent"."ParentID" = t1."ParentID" + )) +FROM + "Parent" t1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.15.LinqService).sql index 1f79e8959ddd..1df4066676e3 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.15.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DynamicParent" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DynamicParent" -( - "ID" SERIAL NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY ("ID") -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DynamicChild" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DynamicChild" -( - "ID" SERIAL NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY ("ID") -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DynamicChild" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DynamicParent" +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + it."ID" +FROM + "DynamicParent" it + LEFT JOIN "DynamicChild" "a_Child" ON it."ID" = "a_Child"."ParentID" +WHERE + "a_Child"."ID" = 123 diff --git a/PostgreSQL.15.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.15.LinqService).sql index a349bd4d98fc..4a037c47bd06 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.15.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + LIMIT 1 + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- PostgreSQL.15 PostgreSQL (asynchronously) diff --git a/PostgreSQL.15.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.15.LinqService).sql index a0ed6e321749..04c432181739 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.15.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + LIMIT 1 + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- PostgreSQL.15 PostgreSQL (asynchronously) diff --git a/PostgreSQL.15.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..c30adfd5fa01 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.15.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" "a_Children" + INNER JOIN "GrandChild" "a_GrandChildren" ON "a_Children"."ParentID" = "a_GrandChildren"."ParentID" AND "a_Children"."ChildID" = "a_GrandChildren"."ChildID" + WHERE + p."ParentID" = "a_Children"."ParentID" + ) +FROM + "Parent" p + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..ed46d4999076 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +WHERE + t1."Value1" = 1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..57401c53cb76 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT DISTINCT + p1."PersonID", + p1."Gender", + p1."FirstName", + p1."LastName" +FROM + "Person" p1 +WHERE + p1."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + p1."Gender" = 'F' + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..b329d91c8533 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + 1 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..05d689c13aa4 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.15.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."MiddleName", + COUNT(*) +FROM + "Person" x +WHERE + x."MiddleName" IS NOT NULL +GROUP BY + x."MiddleName" +UNION ALL +SELECT + x_1."MiddleName", + COUNT(*) +FROM + "Person" x_1 +WHERE + x_1."MiddleName" IS NOT NULL +GROUP BY + x_1."MiddleName" +UNION ALL +SELECT + x_2."MiddleName", + COUNT(*) +FROM + "Person" x_2 +WHERE + x_2."MiddleName" IS NOT NULL +GROUP BY + x_2."MiddleName" +UNION ALL +SELECT + x_3."MiddleName", + COUNT(*) +FROM + "Person" x_3 +WHERE + x_3."MiddleName" IS NOT NULL +GROUP BY + x_3."MiddleName" +UNION ALL +SELECT + x_4."MiddleName", + COUNT(*) +FROM + "Person" x_4 +WHERE + x_4."MiddleName" IS NOT NULL +GROUP BY + x_4."MiddleName" +UNION ALL +SELECT + x_5."MiddleName", + COUNT(*) +FROM + "Person" x_5 +WHERE + x_5."MiddleName" IS NOT NULL +GROUP BY + x_5."MiddleName" +UNION ALL +SELECT + x_6."MiddleName", + COUNT(*) +FROM + "Person" x_6 +WHERE + x_6."MiddleName" IS NOT NULL +GROUP BY + x_6."MiddleName" +UNION ALL +SELECT + x_7."MiddleName", + COUNT(*) +FROM + "Person" x_7 +WHERE + x_7."MiddleName" IS NOT NULL +GROUP BY + x_7."MiddleName" +UNION ALL +SELECT + x_8."MiddleName", + COUNT(*) +FROM + "Person" x_8 +WHERE + x_8."MiddleName" IS NOT NULL +GROUP BY + x_8."MiddleName" +UNION ALL +SELECT + x_9."MiddleName", + COUNT(*) +FROM + "Person" x_9 +WHERE + x_9."MiddleName" IS NOT NULL +GROUP BY + x_9."MiddleName" +UNION ALL +SELECT + x_10."MiddleName", + COUNT(*) +FROM + "Person" x_10 +WHERE + x_10."MiddleName" IS NOT NULL +GROUP BY + x_10."MiddleName" +UNION ALL +SELECT + x_11."MiddleName", + COUNT(*) +FROM + "Person" x_11 +WHERE + x_11."MiddleName" IS NOT NULL +GROUP BY + x_11."MiddleName" +UNION ALL +SELECT + x_12."MiddleName", + COUNT(*) +FROM + "Person" x_12 +WHERE + x_12."MiddleName" IS NOT NULL +GROUP BY + x_12."MiddleName" +UNION ALL +SELECT + x_13."MiddleName", + COUNT(*) +FROM + "Person" x_13 +WHERE + x_13."MiddleName" IS NOT NULL +GROUP BY + x_13."MiddleName" +UNION ALL +SELECT + x_14."MiddleName", + COUNT(*) +FROM + "Person" x_14 +WHERE + x_14."MiddleName" IS NOT NULL +GROUP BY + x_14."MiddleName" +UNION ALL +SELECT + x_15."MiddleName", + COUNT(*) +FROM + "Person" x_15 +WHERE + x_15."MiddleName" IS NOT NULL +GROUP BY + x_15."MiddleName" +UNION ALL +SELECT + x_16."MiddleName", + COUNT(*) +FROM + "Person" x_16 +WHERE + x_16."MiddleName" IS NOT NULL +GROUP BY + x_16."MiddleName" +UNION ALL +SELECT + x_17."MiddleName", + COUNT(*) +FROM + "Person" x_17 +WHERE + x_17."MiddleName" IS NOT NULL +GROUP BY + x_17."MiddleName" +UNION ALL +SELECT + x_18."MiddleName", + COUNT(*) +FROM + "Person" x_18 +WHERE + x_18."MiddleName" IS NOT NULL +GROUP BY + x_18."MiddleName" +UNION ALL +SELECT + x_19."MiddleName", + COUNT(*) +FROM + "Person" x_19 +WHERE + x_19."MiddleName" IS NOT NULL +GROUP BY + x_19."MiddleName" +UNION ALL +SELECT + x_20."MiddleName", + COUNT(*) +FROM + "Person" x_20 +WHERE + x_20."MiddleName" IS NOT NULL +GROUP BY + x_20."MiddleName" + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.15.LinqService,False).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.15.LinqService,False).sql new file mode 100644 index 000000000000..d46171512bf2 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.15.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.15.LinqService,True).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.15.LinqService,True).sql new file mode 100644 index 000000000000..d46171512bf2 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.15.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.15.LinqService,False).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.15.LinqService,False).sql new file mode 100644 index 000000000000..d46171512bf2 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.15.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.15.LinqService,True).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.15.LinqService,True).sql new file mode 100644 index 000000000000..d46171512bf2 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.15.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.15.LinqService).sql index 88e4b17a38ef..55a3abb69da1 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.15.LinqService).sql @@ -1,74 +1,13 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TakeSkipClass" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TakeSkipClass" -( - "Value" VarChar(10) NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TakeSkipClass" +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @skip Integer -- Int32 +SET @skip = 3 + +SELECT + t1."Value" +FROM + "TakeSkipClass" t1 +ORDER BY + t1."Value" +OFFSET :skip diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.15.LinqService,False).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.15.LinqService,False).sql index aeb455eb9225..1357b64275a4 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.15.LinqService,False).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.15.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" ch LIMIT 3 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT 2 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT 3 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.15.LinqService,True).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.15.LinqService,True).sql index 435febe9f05a..c92c27499e02 100644 --- a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.15.LinqService,True).sql +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.15.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" ch LIMIT :take +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT :take + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT :take + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.15.LinqService,False).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.15.LinqService,False).sql new file mode 100644 index 000000000000..0b44757fc02a --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.15.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :n + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.15.LinqService,True).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.15.LinqService,True).sql new file mode 100644 index 000000000000..0b44757fc02a --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.15.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :n + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.15.LinqService,False).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.15.LinqService,False).sql new file mode 100644 index 000000000000..3ea615ffead0 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.15.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +LIMIT 3 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.15.LinqService,True).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.15.LinqService,True).sql new file mode 100644 index 000000000000..4460bda4782a --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.15.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +LIMIT :take + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.15.LinqService,False).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.15.LinqService,False).sql new file mode 100644 index 000000000000..d5cf713cb8ec --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.15.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +LIMIT 3 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.15.LinqService,True).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.15.LinqService,True).sql new file mode 100644 index 000000000000..a2dbc7de9187 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.15.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +LIMIT :take + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.15.LinqService,False).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.15.LinqService,False).sql new file mode 100644 index 000000000000..c7a2495c2af7 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.15.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT 3 + diff --git a/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.15.LinqService,True).sql b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.15.LinqService,True).sql new file mode 100644 index 000000000000..a709d55e2fc5 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.15.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :take + diff --git a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,False,False).sql b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,False,False).sql index b08bd6fc258d..fe153825dd49 100644 --- a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,False,False).sql +++ b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,False,True).sql b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,False,True).sql index 0c7216b36c7b..ac4f8bddb27b 100644 --- a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,False,True).sql +++ b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,False,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,True,False).sql b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,True,False).sql index 7e593dadfc1f..9a2b587c656a 100644 --- a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,True,False).sql +++ b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,True,True).sql b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,True,True).sql index d1f4ccb85a99..2fad89b0ac17 100644 --- a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,True,True).sql +++ b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,False,True,True).sql @@ -21,3 +21,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE testdata.public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,False,False).sql b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,False,False).sql index b08bd6fc258d..fe153825dd49 100644 --- a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,False,False).sql +++ b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,False,True).sql b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,False,True).sql index 0c7216b36c7b..ac4f8bddb27b 100644 --- a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,False,True).sql +++ b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,False,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,True,False).sql b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,True,False).sql index 7e593dadfc1f..9a2b587c656a 100644 --- a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,True,False).sql +++ b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,True,True).sql b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,True,True).sql index d1f4ccb85a99..2fad89b0ac17 100644 --- a/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,True,True).sql +++ b/PostgreSQL.15.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.15.LinqService,True,True,True).sql @@ -21,3 +21,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE testdata.public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..5a19445be03e --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TestTable" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "TestTable" +( + "ID" SERIAL NOT NULL, + "Field1" text NULL, + "Field2" text NULL, + "CreatedOn" TimeStamp NULL, + + CONSTRAINT "PK_TestTable" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ID", + t1."Field1", + t1."Field2", + t1."CreatedOn" +FROM + "TestTable" t1 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE "TestTable" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.15.LinqService).sql index 34235a04396a..d0359251d658 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.15.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TempTable" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE IF NOT EXISTS "TempTable" +( + "ID" Int NOT NULL +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "TempTable" +( + "ID" +) +SELECT + p."ParentID" +FROM + "Parent" p + +BeforeExecute -- PostgreSQL.15 PostgreSQL SELECT @@ -7,3 +32,8 @@ FROM "Parent" p INNER JOIN "TempTable" t ON p."ParentID" = t."ID" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TempTable" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..732a13d19d09 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.15.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson" t1 +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.15.LinqService,100).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.15.LinqService,100).sql index 5b3f0e24eca0..1a10d299677a 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.15.LinqService,100).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.15.LinqService,100).sql @@ -10,3 +10,20 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TableWithData" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.15.LinqService,200).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.15.LinqService,200).sql index 5b3f0e24eca0..1a10d299677a 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.15.LinqService,200).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.15.LinqService,200).sql @@ -10,3 +10,20 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TableWithData" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.15.LinqService,100).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.15.LinqService,100).sql index e2d685651880..ed0414cc2904 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.15.LinqService,100).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.15.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.15.LinqService,200).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.15.LinqService,200).sql index e2d685651880..ed0414cc2904 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.15.LinqService,200).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.15.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.15.LinqService,100).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.15.LinqService,100).sql index 5b3f0e24eca0..01990960d287 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.15.LinqService,100).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.15.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.15.LinqService,200).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.15.LinqService,200).sql index 5b3f0e24eca0..a464de45c0df 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.15.LinqService,200).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.15.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,100).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,100).sql index e2d685651880..72420c04d706 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,100).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,200).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,200).sql index e2d685651880..af0f6632ba7a 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,200).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.15.LinqService,100).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.15.LinqService,100).sql index 5b3f0e24eca0..c05d18ed98ee 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.15.LinqService,100).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.15.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.15.LinqService,200).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.15.LinqService,200).sql index 5b3f0e24eca0..c05d18ed98ee 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.15.LinqService,200).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.15.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,100).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,100).sql index e2d685651880..1cf99c82467d 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,100).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,200).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,200).sql index e2d685651880..1cf99c82467d 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,200).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.15.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..813361afbe62 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..9e456c9f8630 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..9e456c9f8630 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.15.LinqService).sql index 029a0a87fc7c..ae5fe32e7ffc 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.15.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) DECLARE @FirstName Text(6) -- String SET @FirstName = 'Steven' DECLARE @LastName Text(4) -- String @@ -54,3 +94,32 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" p +WHERE + p."FirstName" = 'Steven' AND p."LastName" = 'King' AND + p."Gender" = 'M' + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.15.LinqService).sql index f0bd3ba451da..acb288acf8df 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.15.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..faea1dc39ec1 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.15.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPatient" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "xxPatient" +( + "PersonID" Int NOT NULL, + "Diagnosis" text NULL, + + CONSTRAINT "PK_xxPatient" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPatient" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.15.LinqService).sql index f0bd3ba451da..9386b8abfac5 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.15.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.15.LinqService).sql index f0bd3ba451da..9386b8abfac5 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.15.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.15.LinqService).sql index 77c1f897628d..427fafda02dd 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.15.LinqService).sql @@ -24,6 +24,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.15.LinqService).sql index 77c1f897628d..427fafda02dd 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.15.LinqService).sql @@ -24,6 +24,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.15.LinqService).sql index f4319d22730f..8558413a40b1 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.15.LinqService).sql @@ -34,6 +34,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Text(5) -- String +SET @p = 'John0' + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.15 PostgreSQL (asynchronously) DECLARE @FirstName Text(5) -- String @@ -62,6 +79,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Text(5) -- String +SET @p = 'John1' + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.15.LinqService,1).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.15.LinqService,1).sql index 04ab9b54fb56..2a10502e3cea 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.15.LinqService,1).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.15.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :Id, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.15.LinqService,2).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.15.LinqService,2).sql index 04ab9b54fb56..19fc0a75ab49 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.15.LinqService,2).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.15.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :Id, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,1).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,1).sql index 04ab9b54fb56..ca12b61d2678 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,1).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,2).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,2).sql index 04ab9b54fb56..661be68169ab 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,2).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.15.LinqService,100).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.15.LinqService,100).sql index 4b168e5ae8bf..e8e27c7c040d 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.15.LinqService,100).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.15.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.15 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.15.LinqService,200).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.15.LinqService,200).sql index b1d5f704b81a..455f5bc88e60 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.15.LinqService,200).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.15.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.15 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.15.LinqService,100).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.15.LinqService,100).sql index dff6cff00d0f..a534e2d5c0fe 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.15.LinqService,100).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.15.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.15 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.15.LinqService,200).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.15.LinqService,200).sql index 14a4996fc296..1a56fa6c6b15 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.15.LinqService,200).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.15.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.15 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.15.LinqService,1).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.15.LinqService,1).sql index 04ab9b54fb56..71ebb3265375 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.15.LinqService,1).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.15.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Id", + "Value", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Id, + :Value, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.15.LinqService,2).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.15.LinqService,2).sql index 04ab9b54fb56..53f91b5c2a9e 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.15.LinqService,2).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.15.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Id", + "Value", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Id, + :Value, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,1).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,1).sql index 04ab9b54fb56..ca12b61d2678 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,1).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,2).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,2).sql index 04ab9b54fb56..661be68169ab 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,2).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.15.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(PostgreSQL.15.LinqService).sql index cdc1a3308403..110d011baac5 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(PostgreSQL.15.LinqService).sql @@ -218,6 +218,45 @@ VALUES :Field4 ) +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 + WHERE + t1."Id" = 5 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(PostgreSQL.15.LinqService).sql index cdc1a3308403..b1728fbbe7ba 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(PostgreSQL.15.LinqService).sql @@ -218,6 +218,43 @@ VALUES :Field4 ) +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..18fc8226ecb9 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = p2."ParentID" +FROM + "Parent" p2 +WHERE + "Parent"."ParentID" < 3 AND "Parent"."ParentID" = p2."ParentID" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..883b23722be9 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" +SET + "ParentID" = "Parent"."ParentID" + 1 +WHERE + "Parent"."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..883b23722be9 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" +SET + "ParentID" = "Parent"."ParentID" + 1 +WHERE + "Parent"."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..c9662c72aea2 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +FROM + "Parent" "a_Parent" +WHERE + "Child"."ChildID" = :id AND "a_Parent"."Value1" = 1 AND + "Child"."ParentID" = "a_Parent"."ParentID" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :p + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..d0d34a208da1 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.15.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +FROM + "Child" child_1 +WHERE + child_1."ChildID" = 10000 AND child_1."ParentID" = "Parent"."ParentID" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..d0d34a208da1 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.15.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +FROM + "Child" child_1 +WHERE + child_1."ChildID" = 10000 AND child_1."ParentID" = "Parent"."ParentID" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.15.LinqService).sql new file mode 100644 index 000000000000..928d0197f554 --- /dev/null +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.15.LinqService).sql @@ -0,0 +1,107 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +UPDATE + "xxPerson" +SET + "FirstName" = :FirstName, + "LastName" = :LastName, + "MiddleName" = :MiddleName, + "Gender" = :Gender +WHERE + "xxPerson"."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.15.LinqService).sql index 03f8d1895136..a4db3ebde31c 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.15.LinqService).sql @@ -31,3 +31,60 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + t1."PersonID", + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +LIMIT 1 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Gender Text(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName Text(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName Text -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName Text(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer -- Int32 +SET @ID = 5 + +UPDATE + "Person" +SET + "Gender" = :Gender, + "FirstName" = :Name_FirstName, + "MiddleName" = :Name_MiddleName, + "LastName" = :Name_LastName +WHERE + "Person"."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + t1."PersonID", + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +LIMIT 1 + diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql index 5de79abac48d..0806a71c40f1 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql @@ -1,436 +1,17 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + s."ValueStr", + "DestinationTable"."Value" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.15.LinqService).sql index 5de79abac48d..f216f436ac8e 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.15.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.15.LinqService).sql index 5de79abac48d..fbbe45dabaf6 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.15.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = t1."Id", + "Value" = t1."Value", + "ValueStr" = t1."ValueStr" +FROM + "TableWithData" t1 +WHERE + t1."Id" = 3 AND "DestinationTable"."Id" = t1."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql index 5de79abac48d..0806a71c40f1 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql @@ -1,436 +1,17 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + s."ValueStr", + "DestinationTable"."Value" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.15.LinqService).sql index 5de79abac48d..f216f436ac8e 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.15.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.15.LinqService).sql index 5de79abac48d..fbbe45dabaf6 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.15.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = t1."Id", + "Value" = t1."Value", + "ValueStr" = t1."ValueStr" +FROM + "TableWithData" t1 +WHERE + t1."Id" = 3 AND "DestinationTable"."Id" = t1."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql index 79a67c285bb9..26634a1d1cd7 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" > 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.15.LinqService).sql index 79a67c285bb9..fd1e861dcfbc 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.15.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" = 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql index 79a67c285bb9..a8551e70c573 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.15.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Id" = "TableWithData"."Id", + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" > 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.15.LinqService).sql b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.15.LinqService).sql index 79a67c285bb9..ac5077fbb1a0 100644 --- a/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.15.LinqService).sql +++ b/PostgreSQL.15.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.15.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Id" = "TableWithData"."Id", + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" = 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.15/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.15).sql b/PostgreSQL.15/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.15).sql new file mode 100644 index 000000000000..c99398483bcd --- /dev/null +++ b/PostgreSQL.15/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.15).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.15/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.15).sql b/PostgreSQL.15/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.15).sql new file mode 100644 index 000000000000..814f793144e3 --- /dev/null +++ b/PostgreSQL.15/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.15).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.15/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.15).sql b/PostgreSQL.15/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.15).sql new file mode 100644 index 000000000000..814f793144e3 --- /dev/null +++ b/PostgreSQL.15/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.15).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + From a365b2262c7f9f324ffd615d16816b7cefe06e2e Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 21:14:40 +0000 Subject: [PATCH 26/40] [Linux / PostgreSQL 17] baselines --- ...s.All4Async(PostgreSQL.17.LinqService).sql | 13 + ...oupBy2Async(PostgreSQL.17.LinqService).sql | 30 ++ ...erable1Test(PostgreSQL.17.LinqService).sql | 9 + ...erable2Test(PostgreSQL.17.LinqService).sql | 11 + ...leCast1Test(PostgreSQL.17.LinqService).sql | 9 + ...leCast2Test(PostgreSQL.17.LinqService).sql | 11 + ...nsAsyncTest(PostgreSQL.17.LinqService).sql | 17 + ...stAsyncTest(PostgreSQL.17.LinqService).sql | 15 + ...akeSkipTest(PostgreSQL.17.LinqService).sql | 16 + ...stOrDefault(PostgreSQL.17.LinqService).sql | 20 + ...upAsyncTest(PostgreSQL.17.LinqService).sql | 21 + ...ntAsyncTest(PostgreSQL.17.LinqService).sql | 21 + ...nyTestAsync(PostgreSQL.17.LinqService).sql | 30 ++ ...yTestAsync2(PostgreSQL.17.LinqService).sql | 30 ++ ...oAsyncdTest(PostgreSQL.17.LinqService).sql | 16 + ...dTest3Async(PostgreSQL.17.LinqService).sql | 28 ++ ...nsTestAsync(PostgreSQL.17.LinqService).sql | 34 ++ ...ntTestAsync(PostgreSQL.17.LinqService).sql | 24 + ...tTestAsync2(PostgreSQL.17.LinqService).sql | 24 + ...tTestAsync1(PostgreSQL.17.LinqService).sql | 28 ++ ...tTestAsync2(PostgreSQL.17.LinqService).sql | 28 ++ ...axTestAsync(PostgreSQL.17.LinqService).sql | 24 + ...xTestAsync2(PostgreSQL.17.LinqService).sql | 24 + ...dicateAsync(PostgreSQL.17.LinqService).sql | 171 +------ ...dicateAsync(PostgreSQL.17.LinqService).sql | 168 +------ ...dicateAsync(PostgreSQL.17.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.17.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.17.LinqService).sql | 168 +------ ...lectorAsync(PostgreSQL.17.LinqService).sql | 168 +------ ...lectorAsync(PostgreSQL.17.LinqService).sql | 168 +------ ...dicateAsync(PostgreSQL.17.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.17.LinqService).sql | 170 +------ ...oncat1Async(PostgreSQL.17.LinqService).sql | 19 + ...rementAsync(PostgreSQL.17.LinqService).sql | 97 ++++ ...lteredAsync(PostgreSQL.17.LinqService).sql | 82 ++++ ...Count1Async(PostgreSQL.17.LinqService).sql | 8 + ...Count2Async(PostgreSQL.17.LinqService).sql | 10 + ...ryMax1Async(PostgreSQL.17.LinqService).sql | 16 + ...s.Issue4602(PostgreSQL.17.LinqService).sql | 48 +- ...e4057_Async(PostgreSQL.17.LinqService).sql | 31 ++ ...Transaction(PostgreSQL.17.LinqService).sql | 31 ++ ...essionAsync(PostgreSQL.17.LinqService).sql | 25 + ....Cast1Async(PostgreSQL.17.LinqService).sql | 11 + ...Test18Async(PostgreSQL.17.LinqService).sql | 14 + ...meter1Async(PostgreSQL.17.LinqService).sql | 6 + ...sue3132Test(PostgreSQL.17.LinqService).sql | 213 +++++++++ ...Async(PostgreSQL.17.LinqService,False).sql | 16 + ...2Async(PostgreSQL.17.LinqService,True).sql | 16 + ...Async(PostgreSQL.17.LinqService,False).sql | 16 + ...3Async(PostgreSQL.17.LinqService,True).sql | 16 + ...eSkip1Async(PostgreSQL.17.LinqService).sql | 83 +--- ...Async(PostgreSQL.17.LinqService,False).sql | 20 + ...1Async(PostgreSQL.17.LinqService,True).sql | 24 + ...Async(PostgreSQL.17.LinqService,False).sql | 12 + ...2Async(PostgreSQL.17.LinqService,True).sql | 12 + ...Async(PostgreSQL.17.LinqService,False).sql | 12 + ...3Async(PostgreSQL.17.LinqService,True).sql | 14 + ...Async(PostgreSQL.17.LinqService,False).sql | 12 + ...4Async(PostgreSQL.17.LinqService,True).sql | 14 + ...Async(PostgreSQL.17.LinqService,False).sql | 10 + ...5Async(PostgreSQL.17.LinqService,True).sql | 12 + ...eSQL.17.LinqService,False,False,False).sql | 16 + ...reSQL.17.LinqService,False,False,True).sql | 16 + ...reSQL.17.LinqService,False,True,False).sql | 16 + ...greSQL.17.LinqService,False,True,True).sql | 16 + ...reSQL.17.LinqService,True,False,False).sql | 16 + ...greSQL.17.LinqService,True,False,True).sql | 16 + ...greSQL.17.LinqService,True,True,False).sql | 16 + ...tgreSQL.17.LinqService,True,True,True).sql | 16 + ...Table1Async(PostgreSQL.17.LinqService).sql | 34 ++ ...eTableAsync(PostgreSQL.17.LinqService).sql | 30 ++ ...leNameAsync(PostgreSQL.17.LinqService).sql | 89 ++++ ...yncTest(PostgreSQL.17.LinqService,100).sql | 17 + ...yncTest(PostgreSQL.17.LinqService,200).sql | 17 + ...eRecord(PostgreSQL.17.LinqService,100).sql | 12 + ...eRecord(PostgreSQL.17.LinqService,200).sql | 12 + ...yncTest(PostgreSQL.17.LinqService,100).sql | 14 + ...yncTest(PostgreSQL.17.LinqService,200).sql | 14 + ...eRecord(PostgreSQL.17.LinqService,100).sql | 14 + ...eRecord(PostgreSQL.17.LinqService,200).sql | 14 + ...yncTest(PostgreSQL.17.LinqService,100).sql | 11 + ...yncTest(PostgreSQL.17.LinqService,200).sql | 11 + ...eRecord(PostgreSQL.17.LinqService,100).sql | 11 + ...eRecord(PostgreSQL.17.LinqService,200).sql | 11 + ...nsert2Async(PostgreSQL.17.LinqService).sql | 44 ++ ...nsert3Async(PostgreSQL.17.LinqService).sql | 46 ++ ...nsert4Async(PostgreSQL.17.LinqService).sql | 46 ++ ...leNameAsync(PostgreSQL.17.LinqService).sql | 69 +++ ...place1Async(PostgreSQL.17.LinqService).sql | 74 +++ ...leNameAsync(PostgreSQL.17.LinqService).sql | 117 +++++ ...pdate3Async(PostgreSQL.17.LinqService).sql | 74 +++ ...date3xAsync(PostgreSQL.17.LinqService).sql | 74 +++ ...ntity1Async(PostgreSQL.17.LinqService).sql | 15 + ...ntity2Async(PostgreSQL.17.LinqService).sql | 15 + ...ntity4Async(PostgreSQL.17.LinqService).sql | 34 ++ ...AsyncTest(PostgreSQL.17.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.17.LinqService,2).sql | 36 +- ...AsyncTest(PostgreSQL.17.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.17.LinqService,2).sql | 36 +- ...stAsync(PostgreSQL.17.LinqService,100).sql | 24 + ...stAsync(PostgreSQL.17.LinqService,200).sql | 24 + ...eRecord(PostgreSQL.17.LinqService,100).sql | 24 + ...eRecord(PostgreSQL.17.LinqService,200).sql | 24 + ...AsyncTest(PostgreSQL.17.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.17.LinqService,2).sql | 36 +- ...AsyncTest(PostgreSQL.17.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.17.LinqService,2).sql | 36 +- ...omQueryAsyn(PostgreSQL.17.LinqService).sql | 39 ++ ...omTableAsyn(PostgreSQL.17.LinqService).sql | 37 ++ ...date12Async(PostgreSQL.17.LinqService).sql | 12 + ...pdate1Async(PostgreSQL.17.LinqService).sql | 54 +++ ...pdate2Async(PostgreSQL.17.LinqService).sql | 54 +++ ...pdate4Async(PostgreSQL.17.LinqService).sql | 55 +++ ...ation1Async(PostgreSQL.17.LinqService).sql | 40 ++ ...on1AsyncOld(PostgreSQL.17.LinqService).sql | 40 ++ ...leNameAsync(PostgreSQL.17.LinqService).sql | 107 +++++ ...mplex1Async(PostgreSQL.17.LinqService).sql | 57 +++ ...cWithoutOld(PostgreSQL.17.LinqService).sql | 449 +----------------- ...rnateUpdate(PostgreSQL.17.LinqService).sql | 448 +---------------- ...ingleRecord(PostgreSQL.17.LinqService).sql | 448 +---------------- ...cWithoutOld(PostgreSQL.17.LinqService).sql | 449 +----------------- ...rnateUpdate(PostgreSQL.17.LinqService).sql | 448 +---------------- ...ingleRecord(PostgreSQL.17.LinqService).sql | 448 +---------------- ...cWithoutOld(PostgreSQL.17.LinqService).sql | 227 +-------- ...ingleRecord(PostgreSQL.17.LinqService).sql | 227 +-------- ...cWithoutOld(PostgreSQL.17.LinqService).sql | 228 +-------- ...ingleRecord(PostgreSQL.17.LinqService).sql | 228 +-------- ...ts.Linq.AsyncTests.Test(PostgreSQL.17).sql | 18 + ...s.Linq.AsyncTests.Test1(PostgreSQL.17).sql | 9 + ....AsyncTests.TestForEach(PostgreSQL.17).sql | 9 + 130 files changed, 3347 insertions(+), 5121 deletions(-) create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.17.LinqService,False).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.17.LinqService,True).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.17.LinqService,False).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.17.LinqService,True).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.17.LinqService,False).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.17.LinqService,True).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.17.LinqService,False).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.17.LinqService,True).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.17.LinqService,False).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.17.LinqService,True).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.17.LinqService,False).sql create mode 100644 PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.17.LinqService,True).sql create mode 100644 PostgreSQL.17.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.17.LinqService).sql create mode 100644 PostgreSQL.17/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.17).sql create mode 100644 PostgreSQL.17/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.17).sql create mode 100644 PostgreSQL.17/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.17).sql diff --git a/PostgreSQL.17.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..9f775632fb77 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" <= 3 + ) + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..283df31c59d0 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT DISTINCT + "a_Parent1"."ParentID" + FROM + "Child" t1 + INNER JOIN "Parent" "a_Parent1" ON t1."ParentID" = "a_Parent1"."ParentID" + ) m_1 + INNER JOIN "Child" d + INNER JOIN "Parent" "a_Parent1_1" ON d."ParentID" = "a_Parent1_1"."ParentID" + ON m_1."ParentID" = "a_Parent1_1"."ParentID" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + "a_Parent1"."ParentID" +FROM + "Child" t1 + INNER JOIN "Parent" "a_Parent1" ON t1."ParentID" = "a_Parent1"."ParentID" +GROUP BY + "a_Parent1"."ParentID" + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..46d77740e853 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.17.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..75631c1b6e64 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.17.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..46d77740e853 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.17.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..75631c1b6e64 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.17.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..8552a80c514a --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.17.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN :ID IN ( + SELECT + t1."PersonID" + FROM + "Person" t1 + ) + THEN True + ELSE False + END + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..29d89503decf --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.17.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."PersonID" = 1 +LIMIT 1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.17.LinqService).sql index dd20bc46f50f..ac4d319bce69 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.17.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY t1."ParentID" LIMIT :take OFFSET :skip +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 +DECLARE @skip Integer -- Int32 +SET @skip = 1 + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +ORDER BY + t1."ParentID" +LIMIT :take OFFSET :skip + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..f970d95ef665 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.17.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer -- Int32 +SET @p_2 = 3 +DECLARE @param Integer -- Int32 +SET @param = 4 + +SELECT + o."ParentID", + o."Value1" +FROM + "Parent" o +WHERE + o."ParentID" IN (:p, :p_1, :p_2) OR o."ParentID" = :param +LIMIT 1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..0cdbd0dcb81c --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.17.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..0cdbd0dcb81c --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.17.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..054bc452be4e --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.17.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..054bc452be4e --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.17.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..09e6d58c013a --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.17.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = :p +ORDER BY + x."ParentID" DESC +LIMIT 1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..b36232f7929f --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT :p + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT :p + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..5370e487b7ce --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.17.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN True + ELSE False + END + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN True + ELSE False + END + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..7a502dfe717d --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.17.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..7a502dfe717d --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.17.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..d2b3235c2b3d --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.17.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..d2b3235c2b3d --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.17.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..36c0d87a2bd1 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.17.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..36c0d87a2bd1 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.17.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.17.LinqService).sql index 460b1b7665c5..53afaa547a8f 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.17.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + "AsyncDataTable" c_1 + WHERE + c_1."Id" = :p + ) diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.17.LinqService).sql index 460b1b7665c5..40ce43509377 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.17.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.17.LinqService).sql index 460b1b7665c5..875f58532c5e 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.17.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 1 diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.17.LinqService).sql index 460b1b7665c5..875f58532c5e 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.17.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 1 diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.17.LinqService).sql index 460b1b7665c5..40ce43509377 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.17.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.17.LinqService).sql index 460b1b7665c5..8e773c456047 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.17.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MAX(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.17.LinqService).sql index 460b1b7665c5..ff561e538f32 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.17.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MIN(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.17.LinqService).sql index 460b1b7665c5..e6cd5c3e4109 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.17.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 2 diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.17.LinqService).sql index 460b1b7665c5..e6cd5c3e4109 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.17.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 2 diff --git a/PostgreSQL.17.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..bfeec3c206f0 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" = 1 +UNION ALL +SELECT + p_1."ParentID", + p_1."Value1" +FROM + "Parent" p_1 +WHERE + p_1."ParentID" = 2 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.17.LinqService).sql index cb345e91c894..b3dca75a99c2 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.17.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value Text(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.17.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.17.LinqService).sql index 3603df0051a3..23a1206b023d 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.17.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value Text(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL SELECT @@ -8,6 +30,24 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" +SET + "Stamp" = "ConcurrencyFiltered"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyFiltered"."Id" = 2 AND "ConcurrencyFiltered"."Id" = :Id AND + "ConcurrencyFiltered"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL @@ -18,6 +58,24 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" +SET + "Stamp" = "ConcurrencyFiltered"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyFiltered"."Id" = 1 AND "ConcurrencyFiltered"."Id" = :Id AND + "ConcurrencyFiltered"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL @@ -28,6 +86,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL @@ -38,6 +108,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..9c326336a989 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" t1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..b68fd66a48c7 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" > 2 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..f6a1f0a14835 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" c_1 + LEFT JOIN "Parent" "a_Parent" ON c_1."ParentID" = "a_Parent"."ParentID" + WHERE + "a_Parent"."ParentID" = t1."ParentID" + )) +FROM + "Parent" t1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.17.LinqService).sql index 15730cf19417..4c4ed30b51c1 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.17.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DynamicParent" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DynamicParent" -( - "ID" SERIAL NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY ("ID") -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DynamicChild" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DynamicChild" -( - "ID" SERIAL NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY ("ID") -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DynamicChild" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DynamicParent" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + it."ID" +FROM + "DynamicParent" it + LEFT JOIN "DynamicChild" "a_Child" ON it."ID" = "a_Child"."ParentID" +WHERE + "a_Child"."ID" = 123 diff --git a/PostgreSQL.17.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.17.LinqService).sql index bd8cda357105..2974ce625d73 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.17.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + LIMIT 1 + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) diff --git a/PostgreSQL.17.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.17.LinqService).sql index 885223970a5d..7e7429ced658 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.17.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + LIMIT 1 + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) diff --git a/PostgreSQL.17.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..e08ce9463ce4 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.17.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" "a_Children" + INNER JOIN "GrandChild" "a_GrandChildren" ON "a_Children"."ParentID" = "a_GrandChildren"."ParentID" AND "a_Children"."ChildID" = "a_GrandChildren"."ChildID" + WHERE + p."ParentID" = "a_Children"."ParentID" + ) +FROM + "Parent" p + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..9fcea6c04fa4 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +WHERE + t1."Value1" = 1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..38725d92a96c --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT DISTINCT + p1."PersonID", + p1."Gender", + p1."FirstName", + p1."LastName" +FROM + "Person" p1 +WHERE + p1."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + p1."Gender" = 'F' + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..64b40a47b6a6 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + 1 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..02f250580cc6 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.17.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."MiddleName", + COUNT(*) +FROM + "Person" x +WHERE + x."MiddleName" IS NOT NULL +GROUP BY + x."MiddleName" +UNION ALL +SELECT + x_1."MiddleName", + COUNT(*) +FROM + "Person" x_1 +WHERE + x_1."MiddleName" IS NOT NULL +GROUP BY + x_1."MiddleName" +UNION ALL +SELECT + x_2."MiddleName", + COUNT(*) +FROM + "Person" x_2 +WHERE + x_2."MiddleName" IS NOT NULL +GROUP BY + x_2."MiddleName" +UNION ALL +SELECT + x_3."MiddleName", + COUNT(*) +FROM + "Person" x_3 +WHERE + x_3."MiddleName" IS NOT NULL +GROUP BY + x_3."MiddleName" +UNION ALL +SELECT + x_4."MiddleName", + COUNT(*) +FROM + "Person" x_4 +WHERE + x_4."MiddleName" IS NOT NULL +GROUP BY + x_4."MiddleName" +UNION ALL +SELECT + x_5."MiddleName", + COUNT(*) +FROM + "Person" x_5 +WHERE + x_5."MiddleName" IS NOT NULL +GROUP BY + x_5."MiddleName" +UNION ALL +SELECT + x_6."MiddleName", + COUNT(*) +FROM + "Person" x_6 +WHERE + x_6."MiddleName" IS NOT NULL +GROUP BY + x_6."MiddleName" +UNION ALL +SELECT + x_7."MiddleName", + COUNT(*) +FROM + "Person" x_7 +WHERE + x_7."MiddleName" IS NOT NULL +GROUP BY + x_7."MiddleName" +UNION ALL +SELECT + x_8."MiddleName", + COUNT(*) +FROM + "Person" x_8 +WHERE + x_8."MiddleName" IS NOT NULL +GROUP BY + x_8."MiddleName" +UNION ALL +SELECT + x_9."MiddleName", + COUNT(*) +FROM + "Person" x_9 +WHERE + x_9."MiddleName" IS NOT NULL +GROUP BY + x_9."MiddleName" +UNION ALL +SELECT + x_10."MiddleName", + COUNT(*) +FROM + "Person" x_10 +WHERE + x_10."MiddleName" IS NOT NULL +GROUP BY + x_10."MiddleName" +UNION ALL +SELECT + x_11."MiddleName", + COUNT(*) +FROM + "Person" x_11 +WHERE + x_11."MiddleName" IS NOT NULL +GROUP BY + x_11."MiddleName" +UNION ALL +SELECT + x_12."MiddleName", + COUNT(*) +FROM + "Person" x_12 +WHERE + x_12."MiddleName" IS NOT NULL +GROUP BY + x_12."MiddleName" +UNION ALL +SELECT + x_13."MiddleName", + COUNT(*) +FROM + "Person" x_13 +WHERE + x_13."MiddleName" IS NOT NULL +GROUP BY + x_13."MiddleName" +UNION ALL +SELECT + x_14."MiddleName", + COUNT(*) +FROM + "Person" x_14 +WHERE + x_14."MiddleName" IS NOT NULL +GROUP BY + x_14."MiddleName" +UNION ALL +SELECT + x_15."MiddleName", + COUNT(*) +FROM + "Person" x_15 +WHERE + x_15."MiddleName" IS NOT NULL +GROUP BY + x_15."MiddleName" +UNION ALL +SELECT + x_16."MiddleName", + COUNT(*) +FROM + "Person" x_16 +WHERE + x_16."MiddleName" IS NOT NULL +GROUP BY + x_16."MiddleName" +UNION ALL +SELECT + x_17."MiddleName", + COUNT(*) +FROM + "Person" x_17 +WHERE + x_17."MiddleName" IS NOT NULL +GROUP BY + x_17."MiddleName" +UNION ALL +SELECT + x_18."MiddleName", + COUNT(*) +FROM + "Person" x_18 +WHERE + x_18."MiddleName" IS NOT NULL +GROUP BY + x_18."MiddleName" +UNION ALL +SELECT + x_19."MiddleName", + COUNT(*) +FROM + "Person" x_19 +WHERE + x_19."MiddleName" IS NOT NULL +GROUP BY + x_19."MiddleName" +UNION ALL +SELECT + x_20."MiddleName", + COUNT(*) +FROM + "Person" x_20 +WHERE + x_20."MiddleName" IS NOT NULL +GROUP BY + x_20."MiddleName" + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.17.LinqService,False).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.17.LinqService,False).sql new file mode 100644 index 000000000000..3c0cbed5eadb --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.17.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.17.LinqService,True).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.17.LinqService,True).sql new file mode 100644 index 000000000000..3c0cbed5eadb --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.17.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.17.LinqService,False).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.17.LinqService,False).sql new file mode 100644 index 000000000000..3c0cbed5eadb --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.17.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.17.LinqService,True).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.17.LinqService,True).sql new file mode 100644 index 000000000000..3c0cbed5eadb --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.17.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.17.LinqService).sql index e2cbba5ae951..d4513e8aef1c 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.17.LinqService).sql @@ -1,74 +1,13 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TakeSkipClass" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TakeSkipClass" -( - "Value" VarChar(10) NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TakeSkipClass" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @skip Integer -- Int32 +SET @skip = 3 + +SELECT + t1."Value" +FROM + "TakeSkipClass" t1 +ORDER BY + t1."Value" +OFFSET :skip diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.17.LinqService,False).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.17.LinqService,False).sql index 55e456a2c667..8a8684646b44 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.17.LinqService,False).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.17.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" ch LIMIT 3 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT 2 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT 3 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.17.LinqService,True).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.17.LinqService,True).sql index cda5008d8ba8..f9073d76b811 100644 --- a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.17.LinqService,True).sql +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.17.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" ch LIMIT :take +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT :take + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT :take + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.17.LinqService,False).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.17.LinqService,False).sql new file mode 100644 index 000000000000..47e8d79e1508 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.17.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :n + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.17.LinqService,True).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.17.LinqService,True).sql new file mode 100644 index 000000000000..47e8d79e1508 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.17.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :n + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.17.LinqService,False).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.17.LinqService,False).sql new file mode 100644 index 000000000000..7385ecf89ee4 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.17.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +LIMIT 3 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.17.LinqService,True).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.17.LinqService,True).sql new file mode 100644 index 000000000000..27804296204c --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.17.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +LIMIT :take + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.17.LinqService,False).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.17.LinqService,False).sql new file mode 100644 index 000000000000..94ff6feb0edf --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.17.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +LIMIT 3 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.17.LinqService,True).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.17.LinqService,True).sql new file mode 100644 index 000000000000..8d30fdb43061 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.17.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +LIMIT :take + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.17.LinqService,False).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.17.LinqService,False).sql new file mode 100644 index 000000000000..40d719d80d36 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.17.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT 3 + diff --git a/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.17.LinqService,True).sql b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.17.LinqService,True).sql new file mode 100644 index 000000000000..adcd41c869d6 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.17.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :take + diff --git a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,False,False).sql b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,False,False).sql index 9657cac7ef9d..2f8623c733e5 100644 --- a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,False,False).sql +++ b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,False,True).sql b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,False,True).sql index 27770d708791..b64aaa6bff6d 100644 --- a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,False,True).sql +++ b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,False,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,True,False).sql b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,True,False).sql index 3861561c8273..6e7b1304ab84 100644 --- a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,True,False).sql +++ b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,True,True).sql b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,True,True).sql index dbb304bdbf6c..e72546cccd2c 100644 --- a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,True,True).sql +++ b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,False,True,True).sql @@ -21,3 +21,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE testdata.public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,False,False).sql b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,False,False).sql index 9657cac7ef9d..2f8623c733e5 100644 --- a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,False,False).sql +++ b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,False,True).sql b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,False,True).sql index 27770d708791..b64aaa6bff6d 100644 --- a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,False,True).sql +++ b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,False,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,True,False).sql b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,True,False).sql index 3861561c8273..6e7b1304ab84 100644 --- a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,True,False).sql +++ b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,True,True).sql b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,True,True).sql index dbb304bdbf6c..e72546cccd2c 100644 --- a/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,True,True).sql +++ b/PostgreSQL.17.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.17.LinqService,True,True,True).sql @@ -21,3 +21,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE testdata.public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..9c714520c422 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TestTable" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "TestTable" +( + "ID" SERIAL NOT NULL, + "Field1" text NULL, + "Field2" text NULL, + "CreatedOn" TimeStamp NULL, + + CONSTRAINT "PK_TestTable" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ID", + t1."Field1", + t1."Field2", + t1."CreatedOn" +FROM + "TestTable" t1 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE "TestTable" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.17.LinqService).sql index e08699df0393..8707e9fa0569 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.17.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TempTable" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE IF NOT EXISTS "TempTable" +( + "ID" Int NOT NULL +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "TempTable" +( + "ID" +) +SELECT + p."ParentID" +FROM + "Parent" p + +BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL SELECT @@ -7,3 +32,8 @@ FROM "Parent" p INNER JOIN "TempTable" t ON p."ParentID" = t."ID" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TempTable" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..5b0b45978401 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.17.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson" t1 +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.17.LinqService,100).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.17.LinqService,100).sql index d7694ccaa724..e8ed54b9439f 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.17.LinqService,100).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.17.LinqService,100).sql @@ -10,3 +10,20 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TableWithData" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.17.LinqService,200).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.17.LinqService,200).sql index d7694ccaa724..e8ed54b9439f 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.17.LinqService,200).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.17.LinqService,200).sql @@ -10,3 +10,20 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TableWithData" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.17.LinqService,100).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.17.LinqService,100).sql index c839ebee00d4..64c6c302223c 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.17.LinqService,100).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.17.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.17.LinqService,200).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.17.LinqService,200).sql index c839ebee00d4..64c6c302223c 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.17.LinqService,200).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.17.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.17.LinqService,100).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.17.LinqService,100).sql index d7694ccaa724..2d09f2fd0e88 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.17.LinqService,100).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.17.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.17.LinqService,200).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.17.LinqService,200).sql index d7694ccaa724..b5c89d3a9912 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.17.LinqService,200).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.17.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,100).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,100).sql index c839ebee00d4..5df7a25b88e4 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,100).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,200).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,200).sql index c839ebee00d4..06411bfd7099 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,200).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.17.LinqService,100).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.17.LinqService,100).sql index d7694ccaa724..bc68f30b71c1 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.17.LinqService,100).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.17.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.17.LinqService,200).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.17.LinqService,200).sql index d7694ccaa724..bc68f30b71c1 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.17.LinqService,200).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.17.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,100).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,100).sql index c839ebee00d4..fcaa80975f72 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,100).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,200).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,200).sql index c839ebee00d4..fcaa80975f72 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,200).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.17.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..0783ef60cdc5 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..c6dcc6555270 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..c6dcc6555270 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.17.LinqService).sql index 6a7412ebb4a1..4d15ac918e5c 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.17.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) DECLARE @FirstName Text(6) -- String SET @FirstName = 'Steven' DECLARE @LastName Text(4) -- String @@ -54,3 +94,32 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" p +WHERE + p."FirstName" = 'Steven' AND p."LastName" = 'King' AND + p."Gender" = 'M' + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.17.LinqService).sql index 9919e4b77568..1ad2e24d6535 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.17.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..89655240f89e --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.17.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPatient" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "xxPatient" +( + "PersonID" Int NOT NULL, + "Diagnosis" text NULL, + + CONSTRAINT "PK_xxPatient" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPatient" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.17.LinqService).sql index 9919e4b77568..d7bd20ebf985 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.17.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.17.LinqService).sql index 9919e4b77568..d7bd20ebf985 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.17.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.17.LinqService).sql index aef921d60fd1..208f3f503bbc 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.17.LinqService).sql @@ -24,6 +24,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.17.LinqService).sql index aef921d60fd1..208f3f503bbc 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.17.LinqService).sql @@ -24,6 +24,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.17.LinqService).sql index 9c5396f9fb5c..380c15e5c161 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.17.LinqService).sql @@ -34,6 +34,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Text(5) -- String +SET @p = 'John0' + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) DECLARE @FirstName Text(5) -- String @@ -62,6 +79,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Text(5) -- String +SET @p = 'John1' + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.17.LinqService,1).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.17.LinqService,1).sql index dc2dc2a7ed68..cc0dc2192d4f 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.17.LinqService,1).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.17.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :Id, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.17.LinqService,2).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.17.LinqService,2).sql index dc2dc2a7ed68..8f5c07e6eb36 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.17.LinqService,2).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.17.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :Id, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,1).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,1).sql index dc2dc2a7ed68..72ae3712ee64 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,1).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,2).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,2).sql index dc2dc2a7ed68..4cb8fb0fb743 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,2).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.17.LinqService,100).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.17.LinqService,100).sql index 483e2e6a990f..7f6341ea35c5 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.17.LinqService,100).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.17.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.17.LinqService,200).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.17.LinqService,200).sql index 31f1073a4337..89bf8ad1c661 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.17.LinqService,200).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.17.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.17.LinqService,100).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.17.LinqService,100).sql index 5717e73c8f97..d67889d9c86f 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.17.LinqService,100).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.17.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.17.LinqService,200).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.17.LinqService,200).sql index 6d903b15c3dc..d36665798c96 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.17.LinqService,200).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.17.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.17.LinqService,1).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.17.LinqService,1).sql index dc2dc2a7ed68..cb4aeded963d 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.17.LinqService,1).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.17.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Id", + "Value", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Id, + :Value, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.17.LinqService,2).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.17.LinqService,2).sql index dc2dc2a7ed68..a3f30352950b 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.17.LinqService,2).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.17.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Id", + "Value", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Id, + :Value, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,1).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,1).sql index dc2dc2a7ed68..72ae3712ee64 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,1).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,2).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,2).sql index dc2dc2a7ed68..4cb8fb0fb743 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,2).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.17.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(PostgreSQL.17.LinqService).sql index 8afd1e8ccaa4..fa2cbe3d4946 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(PostgreSQL.17.LinqService).sql @@ -218,6 +218,45 @@ VALUES :Field4 ) +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 + WHERE + t1."Id" = 5 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(PostgreSQL.17.LinqService).sql index 8afd1e8ccaa4..f67d92ba7fa2 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(PostgreSQL.17.LinqService).sql @@ -218,6 +218,43 @@ VALUES :Field4 ) +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- PostgreSQL.17 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..6a92f22dc1a6 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = p2."ParentID" +FROM + "Parent" p2 +WHERE + "Parent"."ParentID" < 3 AND "Parent"."ParentID" = p2."ParentID" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..33045056813b --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" +SET + "ParentID" = "Parent"."ParentID" + 1 +WHERE + "Parent"."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..33045056813b --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" +SET + "ParentID" = "Parent"."ParentID" + 1 +WHERE + "Parent"."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..3425ba4826ad --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +FROM + "Parent" "a_Parent" +WHERE + "Child"."ChildID" = :id AND "a_Parent"."Value1" = 1 AND + "Child"."ParentID" = "a_Parent"."ParentID" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :p + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..1d3e036f612f --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.17.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +FROM + "Child" child_1 +WHERE + child_1."ChildID" = 10000 AND child_1."ParentID" = "Parent"."ParentID" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..1d3e036f612f --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.17.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +FROM + "Child" child_1 +WHERE + child_1."ChildID" = 10000 AND child_1."ParentID" = "Parent"."ParentID" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.17.LinqService).sql new file mode 100644 index 000000000000..71eae1c1a727 --- /dev/null +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.17.LinqService).sql @@ -0,0 +1,107 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +UPDATE + "xxPerson" +SET + "FirstName" = :FirstName, + "LastName" = :LastName, + "MiddleName" = :MiddleName, + "Gender" = :Gender +WHERE + "xxPerson"."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.17.LinqService).sql index 170800fcb32b..e452b623f659 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.17.LinqService).sql @@ -31,3 +31,60 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + t1."PersonID", + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +LIMIT 1 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Gender Text(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName Text(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName Text -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName Text(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer -- Int32 +SET @ID = 5 + +UPDATE + "Person" +SET + "Gender" = :Gender, + "FirstName" = :Name_FirstName, + "MiddleName" = :Name_MiddleName, + "LastName" = :Name_LastName +WHERE + "Person"."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + t1."PersonID", + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +LIMIT 1 + diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql index 7edb3531e860..0fb9dfe7ad47 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql @@ -1,436 +1,17 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + s."ValueStr", + "DestinationTable"."Value" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.17.LinqService).sql index 7edb3531e860..4c33392bfe68 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.17.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.17.LinqService).sql index 7edb3531e860..10ee62aaaa35 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.17.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = t1."Id", + "Value" = t1."Value", + "ValueStr" = t1."ValueStr" +FROM + "TableWithData" t1 +WHERE + t1."Id" = 3 AND "DestinationTable"."Id" = t1."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql index 7edb3531e860..0fb9dfe7ad47 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql @@ -1,436 +1,17 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + s."ValueStr", + "DestinationTable"."Value" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.17.LinqService).sql index 7edb3531e860..4c33392bfe68 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.17.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.17.LinqService).sql index 7edb3531e860..10ee62aaaa35 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.17.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = t1."Id", + "Value" = t1."Value", + "ValueStr" = t1."ValueStr" +FROM + "TableWithData" t1 +WHERE + t1."Id" = 3 AND "DestinationTable"."Id" = t1."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql index abf76498e836..3f0023032f8f 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" > 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.17.LinqService).sql index abf76498e836..4700b96120e7 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.17.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" = 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql index abf76498e836..4ebec3543559 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.17.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Id" = "TableWithData"."Id", + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" > 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.17.LinqService).sql index abf76498e836..31ca399738ae 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.17.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.17 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Id" = "TableWithData"."Id", + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" = 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.17/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.17).sql b/PostgreSQL.17/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.17).sql new file mode 100644 index 000000000000..c080ca727bc6 --- /dev/null +++ b/PostgreSQL.17/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.17).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.17/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.17).sql b/PostgreSQL.17/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.17).sql new file mode 100644 index 000000000000..46d77740e853 --- /dev/null +++ b/PostgreSQL.17/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.17).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.17/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.17).sql b/PostgreSQL.17/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.17).sql new file mode 100644 index 000000000000..46d77740e853 --- /dev/null +++ b/PostgreSQL.17/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.17).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.17 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + From 66438521019ed0258c7a5b397ebfe7584555300b Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 21:15:58 +0000 Subject: [PATCH 27/40] [Linux / PostgreSQL 16] baselines --- ...s.All4Async(PostgreSQL.16.LinqService).sql | 13 + ...oupBy2Async(PostgreSQL.16.LinqService).sql | 30 ++ ...erable1Test(PostgreSQL.16.LinqService).sql | 9 + ...erable2Test(PostgreSQL.16.LinqService).sql | 11 + ...leCast1Test(PostgreSQL.16.LinqService).sql | 9 + ...leCast2Test(PostgreSQL.16.LinqService).sql | 11 + ...nsAsyncTest(PostgreSQL.16.LinqService).sql | 17 + ...stAsyncTest(PostgreSQL.16.LinqService).sql | 15 + ...akeSkipTest(PostgreSQL.16.LinqService).sql | 16 + ...stOrDefault(PostgreSQL.16.LinqService).sql | 20 + ...upAsyncTest(PostgreSQL.16.LinqService).sql | 21 + ...ntAsyncTest(PostgreSQL.16.LinqService).sql | 21 + ...nyTestAsync(PostgreSQL.16.LinqService).sql | 30 ++ ...yTestAsync2(PostgreSQL.16.LinqService).sql | 30 ++ ...oAsyncdTest(PostgreSQL.16.LinqService).sql | 16 + ...dTest3Async(PostgreSQL.16.LinqService).sql | 28 ++ ...nsTestAsync(PostgreSQL.16.LinqService).sql | 34 ++ ...ntTestAsync(PostgreSQL.16.LinqService).sql | 24 + ...tTestAsync2(PostgreSQL.16.LinqService).sql | 24 + ...tTestAsync1(PostgreSQL.16.LinqService).sql | 28 ++ ...tTestAsync2(PostgreSQL.16.LinqService).sql | 28 ++ ...axTestAsync(PostgreSQL.16.LinqService).sql | 24 + ...xTestAsync2(PostgreSQL.16.LinqService).sql | 24 + ...dicateAsync(PostgreSQL.16.LinqService).sql | 171 +------ ...dicateAsync(PostgreSQL.16.LinqService).sql | 168 +------ ...dicateAsync(PostgreSQL.16.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.16.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.16.LinqService).sql | 168 +------ ...lectorAsync(PostgreSQL.16.LinqService).sql | 168 +------ ...lectorAsync(PostgreSQL.16.LinqService).sql | 168 +------ ...dicateAsync(PostgreSQL.16.LinqService).sql | 170 +------ ...dicateAsync(PostgreSQL.16.LinqService).sql | 170 +------ ...oncat1Async(PostgreSQL.16.LinqService).sql | 19 + ...rementAsync(PostgreSQL.16.LinqService).sql | 97 ++++ ...lteredAsync(PostgreSQL.16.LinqService).sql | 82 ++++ ...Count1Async(PostgreSQL.16.LinqService).sql | 8 + ...Count2Async(PostgreSQL.16.LinqService).sql | 10 + ...ryMax1Async(PostgreSQL.16.LinqService).sql | 16 + ...s.Issue4602(PostgreSQL.16.LinqService).sql | 48 +- ...e4057_Async(PostgreSQL.16.LinqService).sql | 31 ++ ...Transaction(PostgreSQL.16.LinqService).sql | 31 ++ ...essionAsync(PostgreSQL.16.LinqService).sql | 25 + ....Cast1Async(PostgreSQL.16.LinqService).sql | 11 + ...Test18Async(PostgreSQL.16.LinqService).sql | 14 + ...meter1Async(PostgreSQL.16.LinqService).sql | 6 + ...sue3132Test(PostgreSQL.16.LinqService).sql | 213 +++++++++ ...Async(PostgreSQL.16.LinqService,False).sql | 16 + ...2Async(PostgreSQL.16.LinqService,True).sql | 16 + ...Async(PostgreSQL.16.LinqService,False).sql | 16 + ...3Async(PostgreSQL.16.LinqService,True).sql | 16 + ...eSkip1Async(PostgreSQL.16.LinqService).sql | 83 +--- ...Async(PostgreSQL.16.LinqService,False).sql | 20 + ...1Async(PostgreSQL.16.LinqService,True).sql | 24 + ...Async(PostgreSQL.16.LinqService,False).sql | 12 + ...2Async(PostgreSQL.16.LinqService,True).sql | 12 + ...Async(PostgreSQL.16.LinqService,False).sql | 12 + ...3Async(PostgreSQL.16.LinqService,True).sql | 14 + ...Async(PostgreSQL.16.LinqService,False).sql | 12 + ...4Async(PostgreSQL.16.LinqService,True).sql | 14 + ...Async(PostgreSQL.16.LinqService,False).sql | 10 + ...5Async(PostgreSQL.16.LinqService,True).sql | 12 + ...eSQL.16.LinqService,False,False,False).sql | 16 + ...reSQL.16.LinqService,False,False,True).sql | 16 + ...reSQL.16.LinqService,False,True,False).sql | 16 + ...greSQL.16.LinqService,False,True,True).sql | 16 + ...reSQL.16.LinqService,True,False,False).sql | 16 + ...greSQL.16.LinqService,True,False,True).sql | 16 + ...greSQL.16.LinqService,True,True,False).sql | 16 + ...tgreSQL.16.LinqService,True,True,True).sql | 16 + ...Table1Async(PostgreSQL.16.LinqService).sql | 34 ++ ...eTableAsync(PostgreSQL.16.LinqService).sql | 30 ++ ...leNameAsync(PostgreSQL.16.LinqService).sql | 89 ++++ ...yncTest(PostgreSQL.16.LinqService,100).sql | 17 + ...yncTest(PostgreSQL.16.LinqService,200).sql | 17 + ...eRecord(PostgreSQL.16.LinqService,100).sql | 12 + ...eRecord(PostgreSQL.16.LinqService,200).sql | 12 + ...yncTest(PostgreSQL.16.LinqService,100).sql | 14 + ...yncTest(PostgreSQL.16.LinqService,200).sql | 14 + ...eRecord(PostgreSQL.16.LinqService,100).sql | 14 + ...eRecord(PostgreSQL.16.LinqService,200).sql | 14 + ...yncTest(PostgreSQL.16.LinqService,100).sql | 11 + ...yncTest(PostgreSQL.16.LinqService,200).sql | 11 + ...eRecord(PostgreSQL.16.LinqService,100).sql | 11 + ...eRecord(PostgreSQL.16.LinqService,200).sql | 11 + ...nsert2Async(PostgreSQL.16.LinqService).sql | 44 ++ ...nsert3Async(PostgreSQL.16.LinqService).sql | 46 ++ ...nsert4Async(PostgreSQL.16.LinqService).sql | 46 ++ ...leNameAsync(PostgreSQL.16.LinqService).sql | 69 +++ ...place1Async(PostgreSQL.16.LinqService).sql | 74 +++ ...leNameAsync(PostgreSQL.16.LinqService).sql | 117 +++++ ...pdate3Async(PostgreSQL.16.LinqService).sql | 74 +++ ...date3xAsync(PostgreSQL.16.LinqService).sql | 74 +++ ...ntity1Async(PostgreSQL.16.LinqService).sql | 15 + ...ntity2Async(PostgreSQL.16.LinqService).sql | 15 + ...ntity4Async(PostgreSQL.16.LinqService).sql | 34 ++ ...AsyncTest(PostgreSQL.16.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.16.LinqService,2).sql | 36 +- ...AsyncTest(PostgreSQL.16.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.16.LinqService,2).sql | 36 +- ...stAsync(PostgreSQL.16.LinqService,100).sql | 24 + ...stAsync(PostgreSQL.16.LinqService,200).sql | 24 + ...eRecord(PostgreSQL.16.LinqService,100).sql | 24 + ...eRecord(PostgreSQL.16.LinqService,200).sql | 24 + ...AsyncTest(PostgreSQL.16.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.16.LinqService,2).sql | 36 +- ...AsyncTest(PostgreSQL.16.LinqService,1).sql | 36 +- ...AsyncTest(PostgreSQL.16.LinqService,2).sql | 36 +- ...omQueryAsyn(PostgreSQL.16.LinqService).sql | 39 ++ ...omTableAsyn(PostgreSQL.16.LinqService).sql | 37 ++ ...date12Async(PostgreSQL.16.LinqService).sql | 12 + ...pdate1Async(PostgreSQL.16.LinqService).sql | 54 +++ ...pdate2Async(PostgreSQL.16.LinqService).sql | 54 +++ ...pdate4Async(PostgreSQL.16.LinqService).sql | 55 +++ ...ation1Async(PostgreSQL.16.LinqService).sql | 40 ++ ...on1AsyncOld(PostgreSQL.16.LinqService).sql | 40 ++ ...leNameAsync(PostgreSQL.16.LinqService).sql | 107 +++++ ...mplex1Async(PostgreSQL.16.LinqService).sql | 57 +++ ...cWithoutOld(PostgreSQL.16.LinqService).sql | 449 +----------------- ...rnateUpdate(PostgreSQL.16.LinqService).sql | 448 +---------------- ...ingleRecord(PostgreSQL.16.LinqService).sql | 448 +---------------- ...cWithoutOld(PostgreSQL.16.LinqService).sql | 449 +----------------- ...rnateUpdate(PostgreSQL.16.LinqService).sql | 448 +---------------- ...ingleRecord(PostgreSQL.16.LinqService).sql | 448 +---------------- ...cWithoutOld(PostgreSQL.16.LinqService).sql | 227 +-------- ...ingleRecord(PostgreSQL.16.LinqService).sql | 227 +-------- ...cWithoutOld(PostgreSQL.16.LinqService).sql | 228 +-------- ...ingleRecord(PostgreSQL.16.LinqService).sql | 228 +-------- ...ts.Linq.AsyncTests.Test(PostgreSQL.16).sql | 18 + ...s.Linq.AsyncTests.Test1(PostgreSQL.16).sql | 9 + ....AsyncTests.TestForEach(PostgreSQL.16).sql | 9 + 130 files changed, 3347 insertions(+), 5121 deletions(-) create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.16.LinqService,False).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.16.LinqService,True).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.16.LinqService,False).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.16.LinqService,True).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.16.LinqService,False).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.16.LinqService,True).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.16.LinqService,False).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.16.LinqService,True).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.16.LinqService,False).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.16.LinqService,True).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.16.LinqService,False).sql create mode 100644 PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.16.LinqService,True).sql create mode 100644 PostgreSQL.16.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.16.LinqService).sql create mode 100644 PostgreSQL.16/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.16).sql create mode 100644 PostgreSQL.16/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.16).sql create mode 100644 PostgreSQL.16/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.16).sql diff --git a/PostgreSQL.16.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..8a465d101378 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" <= 3 + ) + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..9e317c3d55ee --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT DISTINCT + "a_Parent1"."ParentID" + FROM + "Child" t1 + INNER JOIN "Parent" "a_Parent1" ON t1."ParentID" = "a_Parent1"."ParentID" + ) m_1 + INNER JOIN "Child" d + INNER JOIN "Parent" "a_Parent1_1" ON d."ParentID" = "a_Parent1_1"."ParentID" + ON m_1."ParentID" = "a_Parent1_1"."ParentID" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + "a_Parent1"."ParentID" +FROM + "Child" t1 + INNER JOIN "Parent" "a_Parent1" ON t1."ParentID" = "a_Parent1"."ParentID" +GROUP BY + "a_Parent1"."ParentID" + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..64acaa114026 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(PostgreSQL.16.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..b02d08aceed6 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(PostgreSQL.16.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..64acaa114026 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(PostgreSQL.16.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..b02d08aceed6 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(PostgreSQL.16.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..45f02770ce28 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(PostgreSQL.16.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN :ID IN ( + SELECT + t1."PersonID" + FROM + "Person" t1 + ) + THEN True + ELSE False + END + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..091588451af0 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(PostgreSQL.16.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."PersonID" = 1 +LIMIT 1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.16.LinqService).sql index 5ed5560b6a59..c043d2ffe38b 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(PostgreSQL.16.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY t1."ParentID" LIMIT :take OFFSET :skip +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 +DECLARE @skip Integer -- Int32 +SET @skip = 1 + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +ORDER BY + t1."ParentID" +LIMIT :take OFFSET :skip + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..ec1df929fbec --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(PostgreSQL.16.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer -- Int32 +SET @p_2 = 3 +DECLARE @param Integer -- Int32 +SET @param = 4 + +SELECT + o."ParentID", + o."Value1" +FROM + "Parent" o +WHERE + o."ParentID" IN (:p, :p_1, :p_2) OR o."ParentID" = :param +LIMIT 1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..6f2d5021ed48 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(PostgreSQL.16.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..6f2d5021ed48 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(PostgreSQL.16.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..ba2f7b057518 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(PostgreSQL.16.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..ba2f7b057518 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(PostgreSQL.16.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..212c9028f359 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(PostgreSQL.16.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = :p +ORDER BY + x."ParentID" DESC +LIMIT 1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..a5e3db61e182 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT :p + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT :p + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..092cb3351712 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(PostgreSQL.16.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN True + ELSE False + END + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN True + ELSE False + END + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..ffdac3745966 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(PostgreSQL.16.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..ffdac3745966 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(PostgreSQL.16.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..60e15d7b6441 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(PostgreSQL.16.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..60e15d7b6441 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(PostgreSQL.16.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +LIMIT 1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..583927517c85 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(PostgreSQL.16.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..583927517c85 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(PostgreSQL.16.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.16.LinqService).sql index 854482fb4f3e..ab6e6e840f38 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(PostgreSQL.16.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + "AsyncDataTable" c_1 + WHERE + c_1."Id" = :p + ) diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.16.LinqService).sql index 854482fb4f3e..0e71954d5324 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(PostgreSQL.16.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.16.LinqService).sql index 854482fb4f3e..62567db242d4 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(PostgreSQL.16.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 1 diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.16.LinqService).sql index 854482fb4f3e..62567db242d4 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(PostgreSQL.16.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 1 diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.16.LinqService).sql index 854482fb4f3e..0e71954d5324 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(PostgreSQL.16.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.16.LinqService).sql index 854482fb4f3e..7dd36be08f60 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(PostgreSQL.16.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MAX(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.16.LinqService).sql index 854482fb4f3e..cd2c85176ad1 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(PostgreSQL.16.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MIN(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.16.LinqService).sql index 854482fb4f3e..510ee4e531c0 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(PostgreSQL.16.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 2 diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.16.LinqService).sql index 854482fb4f3e..510ee4e531c0 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(PostgreSQL.16.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "AsyncDataTable" -( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "AsyncDataTable" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + :p, + c_1."Id" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +LIMIT 2 diff --git a/PostgreSQL.16.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..62b73b20e628 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" = 1 +UNION ALL +SELECT + p_1."ParentID", + p_1."Value1" +FROM + "Parent" p_1 +WHERE + p_1."ParentID" = 2 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.16.LinqService).sql index 5ea56206faa4..613e05ddfdc9 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(PostgreSQL.16.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value Text(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" +SET + "Stamp" = "ConcurrencyAutoIncrement"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyAutoIncrement"."Id" = :Id AND "ConcurrencyAutoIncrement"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.16.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.16.LinqService).sql index d133f4ccf017..f2df79c6f335 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(PostgreSQL.16.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value Text(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL SELECT @@ -8,6 +30,24 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" +SET + "Stamp" = "ConcurrencyFiltered"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyFiltered"."Id" = 2 AND "ConcurrencyFiltered"."Id" = :Id AND + "ConcurrencyFiltered"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL @@ -18,6 +58,24 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Text(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" +SET + "Stamp" = "ConcurrencyFiltered"."Stamp" + 1, + "Value" = :Value +WHERE + "ConcurrencyFiltered"."Id" = 1 AND "ConcurrencyFiltered"."Id" = :Id AND + "ConcurrencyFiltered"."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL @@ -28,6 +86,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL @@ -38,6 +108,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..e0e285116445 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" t1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..8446455064f1 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" > 2 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..ddc9cd7b4661 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" c_1 + LEFT JOIN "Parent" "a_Parent" ON c_1."ParentID" = "a_Parent"."ParentID" + WHERE + "a_Parent"."ParentID" = t1."ParentID" + )) +FROM + "Parent" t1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.16.LinqService).sql index 11518a34020d..e93f84b80947 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(PostgreSQL.16.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DynamicParent" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DynamicParent" -( - "ID" SERIAL NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY ("ID") -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DynamicChild" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DynamicChild" -( - "ID" SERIAL NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY ("ID") -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DynamicChild" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DynamicParent" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + it."ID" +FROM + "DynamicParent" it + LEFT JOIN "DynamicChild" "a_Child" ON it."ID" = "a_Child"."ParentID" +WHERE + "a_Child"."ID" = 123 diff --git a/PostgreSQL.16.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.16.LinqService).sql index 8b60e7ba2218..d8d163944cc5 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(PostgreSQL.16.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + LIMIT 1 + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) diff --git a/PostgreSQL.16.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.16.LinqService).sql index c14a965bee37..34971cac0a27 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(PostgreSQL.16.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + LIMIT 1 + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) diff --git a/PostgreSQL.16.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..fdd577cbcff6 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(PostgreSQL.16.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" "a_Children" + INNER JOIN "GrandChild" "a_GrandChildren" ON "a_Children"."ParentID" = "a_GrandChildren"."ParentID" AND "a_Children"."ChildID" = "a_GrandChildren"."ChildID" + WHERE + p."ParentID" = "a_Children"."ParentID" + ) +FROM + "Parent" p + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..1ebaf4499f13 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +WHERE + t1."Value1" = 1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..1c88ab281096 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT DISTINCT + p1."PersonID", + p1."Gender", + p1."FirstName", + p1."LastName" +FROM + "Person" p1 +WHERE + p1."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + p1."Gender" = 'F' + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..f2c3ea6423e9 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + 1 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..5f17c1355e54 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(PostgreSQL.16.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + x."MiddleName", + COUNT(*) +FROM + "Person" x +WHERE + x."MiddleName" IS NOT NULL +GROUP BY + x."MiddleName" +UNION ALL +SELECT + x_1."MiddleName", + COUNT(*) +FROM + "Person" x_1 +WHERE + x_1."MiddleName" IS NOT NULL +GROUP BY + x_1."MiddleName" +UNION ALL +SELECT + x_2."MiddleName", + COUNT(*) +FROM + "Person" x_2 +WHERE + x_2."MiddleName" IS NOT NULL +GROUP BY + x_2."MiddleName" +UNION ALL +SELECT + x_3."MiddleName", + COUNT(*) +FROM + "Person" x_3 +WHERE + x_3."MiddleName" IS NOT NULL +GROUP BY + x_3."MiddleName" +UNION ALL +SELECT + x_4."MiddleName", + COUNT(*) +FROM + "Person" x_4 +WHERE + x_4."MiddleName" IS NOT NULL +GROUP BY + x_4."MiddleName" +UNION ALL +SELECT + x_5."MiddleName", + COUNT(*) +FROM + "Person" x_5 +WHERE + x_5."MiddleName" IS NOT NULL +GROUP BY + x_5."MiddleName" +UNION ALL +SELECT + x_6."MiddleName", + COUNT(*) +FROM + "Person" x_6 +WHERE + x_6."MiddleName" IS NOT NULL +GROUP BY + x_6."MiddleName" +UNION ALL +SELECT + x_7."MiddleName", + COUNT(*) +FROM + "Person" x_7 +WHERE + x_7."MiddleName" IS NOT NULL +GROUP BY + x_7."MiddleName" +UNION ALL +SELECT + x_8."MiddleName", + COUNT(*) +FROM + "Person" x_8 +WHERE + x_8."MiddleName" IS NOT NULL +GROUP BY + x_8."MiddleName" +UNION ALL +SELECT + x_9."MiddleName", + COUNT(*) +FROM + "Person" x_9 +WHERE + x_9."MiddleName" IS NOT NULL +GROUP BY + x_9."MiddleName" +UNION ALL +SELECT + x_10."MiddleName", + COUNT(*) +FROM + "Person" x_10 +WHERE + x_10."MiddleName" IS NOT NULL +GROUP BY + x_10."MiddleName" +UNION ALL +SELECT + x_11."MiddleName", + COUNT(*) +FROM + "Person" x_11 +WHERE + x_11."MiddleName" IS NOT NULL +GROUP BY + x_11."MiddleName" +UNION ALL +SELECT + x_12."MiddleName", + COUNT(*) +FROM + "Person" x_12 +WHERE + x_12."MiddleName" IS NOT NULL +GROUP BY + x_12."MiddleName" +UNION ALL +SELECT + x_13."MiddleName", + COUNT(*) +FROM + "Person" x_13 +WHERE + x_13."MiddleName" IS NOT NULL +GROUP BY + x_13."MiddleName" +UNION ALL +SELECT + x_14."MiddleName", + COUNT(*) +FROM + "Person" x_14 +WHERE + x_14."MiddleName" IS NOT NULL +GROUP BY + x_14."MiddleName" +UNION ALL +SELECT + x_15."MiddleName", + COUNT(*) +FROM + "Person" x_15 +WHERE + x_15."MiddleName" IS NOT NULL +GROUP BY + x_15."MiddleName" +UNION ALL +SELECT + x_16."MiddleName", + COUNT(*) +FROM + "Person" x_16 +WHERE + x_16."MiddleName" IS NOT NULL +GROUP BY + x_16."MiddleName" +UNION ALL +SELECT + x_17."MiddleName", + COUNT(*) +FROM + "Person" x_17 +WHERE + x_17."MiddleName" IS NOT NULL +GROUP BY + x_17."MiddleName" +UNION ALL +SELECT + x_18."MiddleName", + COUNT(*) +FROM + "Person" x_18 +WHERE + x_18."MiddleName" IS NOT NULL +GROUP BY + x_18."MiddleName" +UNION ALL +SELECT + x_19."MiddleName", + COUNT(*) +FROM + "Person" x_19 +WHERE + x_19."MiddleName" IS NOT NULL +GROUP BY + x_19."MiddleName" +UNION ALL +SELECT + x_20."MiddleName", + COUNT(*) +FROM + "Person" x_20 +WHERE + x_20."MiddleName" IS NOT NULL +GROUP BY + x_20."MiddleName" + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.16.LinqService,False).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.16.LinqService,False).sql new file mode 100644 index 000000000000..69814cccb126 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.16.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.16.LinqService,True).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.16.LinqService,True).sql new file mode 100644 index 000000000000..69814cccb126 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(PostgreSQL.16.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.16.LinqService,False).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.16.LinqService,False).sql new file mode 100644 index 000000000000..69814cccb126 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.16.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.16.LinqService,True).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.16.LinqService,True).sql new file mode 100644 index 000000000000..69814cccb126 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(PostgreSQL.16.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +LIMIT 1 OFFSET :n + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.16.LinqService).sql index ea15c90a3ac3..7fa0f7fb6a2c 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(PostgreSQL.16.LinqService).sql @@ -1,74 +1,13 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TakeSkipClass" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TakeSkipClass" -( - "Value" VarChar(10) NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Value Varchar(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TakeSkipClass" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @skip Integer -- Int32 +SET @skip = 3 + +SELECT + t1."Value" +FROM + "TakeSkipClass" t1 +ORDER BY + t1."Value" +OFFSET :skip diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.16.LinqService,False).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.16.LinqService,False).sql index 418f33e866b6..de5a9ee05300 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.16.LinqService,False).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.16.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" ch LIMIT 3 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT 2 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT 3 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.16.LinqService,True).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.16.LinqService,True).sql index 7f8be4f353f6..d406af4a9477 100644 --- a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.16.LinqService,True).sql +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(PostgreSQL.16.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" ch LIMIT :take +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 2 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT :take + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +LIMIT :take + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.16.LinqService,False).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.16.LinqService,False).sql new file mode 100644 index 000000000000..b28b03c4f76d --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.16.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :n + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.16.LinqService,True).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.16.LinqService,True).sql new file mode 100644 index 000000000000..b28b03c4f76d --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(PostgreSQL.16.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @n Integer -- Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :n + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.16.LinqService,False).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.16.LinqService,False).sql new file mode 100644 index 000000000000..51342f537370 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.16.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +LIMIT 3 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.16.LinqService,True).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.16.LinqService,True).sql new file mode 100644 index 000000000000..4dfde6b08cda --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(PostgreSQL.16.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +LIMIT :take + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.16.LinqService,False).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.16.LinqService,False).sql new file mode 100644 index 000000000000..5e38b004f71b --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.16.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +LIMIT 3 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.16.LinqService,True).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.16.LinqService,True).sql new file mode 100644 index 000000000000..31f7f918d867 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(PostgreSQL.16.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +LIMIT :take + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.16.LinqService,False).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.16.LinqService,False).sql new file mode 100644 index 000000000000..5b07dd6f570a --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.16.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT 3 + diff --git a/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.16.LinqService,True).sql b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.16.LinqService,True).sql new file mode 100644 index 000000000000..96d8257df243 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(PostgreSQL.16.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @take Integer -- Int32 +SET @take = 3 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +LIMIT :take + diff --git a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,False,False).sql b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,False,False).sql index 4c99f34a341d..44b236768bad 100644 --- a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,False,False).sql +++ b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,False,True).sql b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,False,True).sql index 1e07d765eee3..a9c3a13278f7 100644 --- a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,False,True).sql +++ b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,False,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,True,False).sql b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,True,False).sql index 89be3fea779b..89128a9d3fe5 100644 --- a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,True,False).sql +++ b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,True,True).sql b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,True,True).sql index 0caeee7ef76d..3c3ba2ef77b3 100644 --- a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,True,True).sql +++ b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,False,True,True).sql @@ -21,3 +21,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE testdata.public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,False,False).sql b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,False,False).sql index 4c99f34a341d..44b236768bad 100644 --- a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,False,False).sql +++ b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,False,True).sql b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,False,True).sql index 1e07d765eee3..a9c3a13278f7 100644 --- a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,False,True).sql +++ b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,False,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,True,False).sql b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,True,False).sql index 89be3fea779b..89128a9d3fe5 100644 --- a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,True,False).sql +++ b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,True,False).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,True,True).sql b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,True,True).sql index 0caeee7ef76d..3c3ba2ef77b3 100644 --- a/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,True,True).sql +++ b/PostgreSQL.16.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(PostgreSQL.16.LinqService,True,True,True).sql @@ -21,3 +21,19 @@ BeforeExecute DROP TABLE IF EXISTS "Issue681Table2" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE testdata.public."Issue681Table2" +( + "ID" Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "Issue681Table2" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..eea760897150 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TestTable" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "TestTable" +( + "ID" SERIAL NOT NULL, + "Field1" text NULL, + "Field2" text NULL, + "CreatedOn" TimeStamp NULL, + + CONSTRAINT "PK_TestTable" PRIMARY KEY ("ID") +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ID", + t1."Field1", + t1."Field2", + t1."CreatedOn" +FROM + "TestTable" t1 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE "TestTable" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.16.LinqService).sql index a64e6d2ed8da..e34ba9d22f80 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(PostgreSQL.16.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TempTable" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE IF NOT EXISTS "TempTable" +( + "ID" Int NOT NULL +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "TempTable" +( + "ID" +) +SELECT + p."ParentID" +FROM + "Parent" p + +BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL SELECT @@ -7,3 +32,8 @@ FROM "Parent" p INNER JOIN "TempTable" t ON p."ParentID" = t."ID" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TempTable" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..eb75cd5bc012 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(PostgreSQL.16.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson" t1 +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.16.LinqService,100).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.16.LinqService,100).sql index d84665233354..44900b84a229 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.16.LinqService,100).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.16.LinqService,100).sql @@ -10,3 +10,20 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TableWithData" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.16.LinqService,200).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.16.LinqService,200).sql index d84665233354..44900b84a229 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.16.LinqService,200).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(PostgreSQL.16.LinqService,200).sql @@ -10,3 +10,20 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "TableWithData" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.16.LinqService,100).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.16.LinqService,100).sql index 64ef91cf30de..33b62394a944 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.16.LinqService,100).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.16.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.16.LinqService,200).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.16.LinqService,200).sql index 64ef91cf30de..33b62394a944 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.16.LinqService,200).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(PostgreSQL.16.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id", + s."Value", + s."ValueStr" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.16.LinqService,100).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.16.LinqService,100).sql index d84665233354..0125249af742 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.16.LinqService,100).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.16.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.16.LinqService,200).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.16.LinqService,200).sql index d84665233354..6f209c80f185 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.16.LinqService,200).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(PostgreSQL.16.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,100).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,100).sql index 64ef91cf30de..50ca8403ff40 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,100).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,200).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,200).sql index 64ef91cf30de..48ffc2c22b94 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,200).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.16.LinqService,100).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.16.LinqService,100).sql index d84665233354..1a104365e40b 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.16.LinqService,100).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.16.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.16.LinqService,200).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.16.LinqService,200).sql index d84665233354..1a104365e40b 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.16.LinqService,200).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(PostgreSQL.16.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" > 3 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,100).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,100).sql index 64ef91cf30de..beb857abf829 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,100).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,200).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,200).sql index 64ef91cf30de..beb857abf829 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,200).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(PostgreSQL.16.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE s."Id" = 3 +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + s."Id" + 1, + s."ValueStr" || 1 + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..9537e50dbca1 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..bee9cb57fdd7 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..bee9cb57fdd7 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.16.LinqService).sql index 8f438ae1f505..6637ec2035c7 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(PostgreSQL.16.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) DECLARE @FirstName Text(6) -- String SET @FirstName = 'Steven' DECLARE @LastName Text(4) -- String @@ -54,3 +94,32 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" p +WHERE + p."FirstName" = 'Steven' AND p."LastName" = 'King' AND + p."Gender" = 'M' + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.16.LinqService).sql index 342ad8cb45b6..bd1eb1563862 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(PostgreSQL.16.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..487d409ec34a --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(PostgreSQL.16.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPatient" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "xxPatient" +( + "PersonID" Int NOT NULL, + "Diagnosis" text NULL, + + CONSTRAINT "PK_xxPatient" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Text(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO "xxPatient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :PersonID, + :Diagnosis +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = :Diagnosis + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPatient" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.16.LinqService).sql index 342ad8cb45b6..f108b4a2d663 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(PostgreSQL.16.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.16.LinqService).sql index 342ad8cb45b6..f108b4a2d663 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(PostgreSQL.16.LinqService).sql @@ -31,3 +31,77 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 0 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 1 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 +DECLARE @i Integer -- Int32 +SET @i = 2 + +INSERT INTO "Patient" AS t1 +( + "PersonID", + "Diagnosis" +) +VALUES +( + :id, + 'abc' +) +ON CONFLICT ("PersonID") DO UPDATE SET + "Diagnosis" = (Length(t1."Diagnosis") + :i)::text + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +LIMIT 2 + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.16.LinqService).sql index f4a7a5862582..cd99215512d3 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(PostgreSQL.16.LinqService).sql @@ -24,6 +24,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.16.LinqService).sql index f4a7a5862582..cd99215512d3 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(PostgreSQL.16.LinqService).sql @@ -24,6 +24,21 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.16.LinqService).sql index f4e289390a8d..9787885c0957 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(PostgreSQL.16.LinqService).sql @@ -34,6 +34,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Text(5) -- String +SET @p = 'John0' + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) DECLARE @FirstName Text(5) -- String @@ -62,6 +79,23 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Text(5) -- String +SET @p = 'John1' + +SELECT + p."FirstName", + p."PersonID", + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.16.LinqService,1).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.16.LinqService,1).sql index 4c54e7e27a0b..18e66c14f968 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.16.LinqService,1).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.16.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :Id, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.16.LinqService,2).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.16.LinqService,2).sql index 4c54e7e27a0b..2bfb27d90bce 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.16.LinqService,2).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(PostgreSQL.16.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :Id, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,1).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,1).sql index 4c54e7e27a0b..01b4686965ed 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,1).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,2).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,2).sql index 4c54e7e27a0b..10f083a06481 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,2).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.16.LinqService,100).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.16.LinqService,100).sql index c8b71829e1a1..0bfa64f8b2c7 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.16.LinqService,100).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.16.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.16.LinqService,200).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.16.LinqService,200).sql index 1414a53ba7d8..aa306ee75063 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.16.LinqService,200).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(PostgreSQL.16.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" > 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.16.LinqService,100).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.16.LinqService,100).sql index 5626e580f822..5541c9d9b921 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.16.LinqService,100).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.16.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 100 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 100 diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.16.LinqService,200).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.16.LinqService,200).sql index 36e0b059355f..91d278ee3886 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.16.LinqService,200).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(PostgreSQL.16.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @param Integer -- Int32 +SET @param = 200 + +INSERT INTO "DestinationTable" +( + "Id", + "Value", + "ValueStr" +) +SELECT + s."Id" + :param, + s."Value" + :param, + s."ValueStr" || :param +FROM + "TableWithData" s +WHERE + s."Id" = 3 +RETURNING + "DestinationTable"."Id", + "DestinationTable"."Value", + "DestinationTable"."ValueStr" + +BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL DECLARE @param Integer -- Int32 SET @param = 200 diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.16.LinqService,1).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.16.LinqService,1).sql index 4c54e7e27a0b..b9b88016d939 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.16.LinqService,1).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.16.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Id", + "Value", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Id, + :Value, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.16.LinqService,2).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.16.LinqService,2).sql index 4c54e7e27a0b..7997f11c35fc 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.16.LinqService,2).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(PostgreSQL.16.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 2 +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Id", + "Value", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Id, + :Value, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,1).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,1).sql index 4c54e7e27a0b..01b4686965ed 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,1).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 100 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,2).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,2).sql index 4c54e7e27a0b..10f083a06481 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,2).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(PostgreSQL.16.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Value Integer -- Int32 +SET @Value = 200 +DECLARE @value_1 Integer -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr Text(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" +INSERT INTO "TableWithData" ( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL + "Value", + "Id", + "ValueStr" ) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +VALUES +( + :Value, + :value_1, + :ValueStr +) +RETURNING + "TableWithData"."Id", + "TableWithData"."Value", + "TableWithData"."ValueStr" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(PostgreSQL.16.LinqService).sql index d8d56d0efd23..594920416cfc 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(PostgreSQL.16.LinqService).sql @@ -218,6 +218,45 @@ VALUES :Field4 ) +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 + WHERE + t1."Id" = 5 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(PostgreSQL.16.LinqService).sql index d8d56d0efd23..b21fdb905ffb 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(PostgreSQL.16.LinqService).sql @@ -218,6 +218,43 @@ VALUES :Field4 ) +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- PostgreSQL.16 PostgreSQL.15 PostgreSQL diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..06cafc38783b --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = p2."ParentID" +FROM + "Parent" p2 +WHERE + "Parent"."ParentID" < 3 AND "Parent"."ParentID" = p2."ParentID" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..f296474755c3 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" +SET + "ParentID" = "Parent"."ParentID" + 1 +WHERE + "Parent"."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..f296474755c3 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" +SET + "ParentID" = "Parent"."ParentID" + 1 +WHERE + "Parent"."ParentID" = :ParentID + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..f58f28f94014 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +FROM + "Parent" "a_Parent" +WHERE + "Child"."ChildID" = :id AND "a_Parent"."Value1" = 1 AND + "Child"."ParentID" = "a_Parent"."ParentID" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :p + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..2dcbd678b0ce --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(PostgreSQL.16.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +FROM + "Child" child_1 +WHERE + child_1."ChildID" = 10000 AND child_1."ParentID" = "Parent"."ParentID" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..2dcbd678b0ce --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(PostgreSQL.16.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +FROM + "Child" child_1 +WHERE + child_1."ChildID" = 10000 AND child_1."ParentID" = "Parent"."ParentID" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.16.LinqService).sql new file mode 100644 index 000000000000..5cd74b10cef1 --- /dev/null +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(PostgreSQL.16.LinqService).sql @@ -0,0 +1,107 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE IF EXISTS "xxPerson" + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" text NOT NULL, + "PersonID" SERIAL NOT NULL, + "LastName" text NOT NULL, + "MiddleName" text NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" t1 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @FirstName Text(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Text(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Text(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- String +SET @Gender = 'M' +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +UPDATE + "xxPerson" +SET + "FirstName" = :FirstName, + "LastName" = :LastName, + "MiddleName" = :MiddleName, + "Gender" = :Gender +WHERE + "xxPerson"."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID", + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson" t1 +LIMIT 2 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.16.LinqService).sql index 6850049a2d5a..9dab883f36ee 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(PostgreSQL.16.LinqService).sql @@ -31,3 +31,60 @@ VALUES RETURNING "PersonID" +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + t1."PersonID", + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +LIMIT 1 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @Gender Text(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName Text(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName Text -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName Text(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer -- Int32 +SET @ID = 5 + +UPDATE + "Person" +SET + "Gender" = :Gender, + "FirstName" = :Name_FirstName, + "MiddleName" = :Name_MiddleName, + "LastName" = :Name_LastName +WHERE + "Person"."PersonID" = :ID + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT + t1."PersonID", + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +LIMIT 1 + diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql index 2f6467dc68dc..912d0d980d30 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql @@ -1,436 +1,17 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + s."ValueStr", + "DestinationTable"."Value" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.16.LinqService).sql index 2f6467dc68dc..261d8abf826f 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.16.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.16.LinqService).sql index 2f6467dc68dc..670aece34489 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.16.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = t1."Id", + "Value" = t1."Value", + "ValueStr" = t1."ValueStr" +FROM + "TableWithData" t1 +WHERE + t1."Id" = 3 AND "DestinationTable"."Id" = t1."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql index 2f6467dc68dc..912d0d980d30 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql @@ -1,436 +1,17 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + s."ValueStr", + "DestinationTable"."Value" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.16.LinqService).sql index 2f6467dc68dc..261d8abf826f 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(PostgreSQL.16.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = s."Id", + "Value" = s."Value", + "ValueStr" = s."ValueStr" +FROM + "TableWithData" s +WHERE + "DestinationTable"."Id" = s."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.16.LinqService).sql index 2f6467dc68dc..670aece34489 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(PostgreSQL.16.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "DestinationTable" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = 0 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO "DestinationTable" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "DestinationTable" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "DestinationTable" +SET + "Id" = t1."Id", + "Value" = t1."Value", + "ValueStr" = t1."ValueStr" +FROM + "TableWithData" t1 +WHERE + t1."Id" = 3 AND "DestinationTable"."Id" = t1."Id" +RETURNING + "DestinationTable"."Value" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql index 4417c3552ef9..513efffe5d18 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" > 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.16.LinqService).sql index 4417c3552ef9..c3889e8f3f72 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.16.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" = 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql index 4417c3552ef9..78042835e8fe 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(PostgreSQL.16.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Id" = "TableWithData"."Id", + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" > 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.16.LinqService).sql b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.16.LinqService).sql index 4417c3552ef9..90dccdcc793c 100644 --- a/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.16.LinqService).sql +++ b/PostgreSQL.16.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(PostgreSQL.16.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -CREATE TABLE IF NOT EXISTS "TableWithData" -( - "Id" Int NOT NULL, - "Value" Int NOT NULL, - "ValueStr" text NULL -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 1 -DECLARE @Value Integer -- Int32 -SET @Value = -1 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 2 -DECLARE @Value Integer -- Int32 -SET @Value = -2 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 3 -DECLARE @Value Integer -- Int32 -SET @Value = -3 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 4 -DECLARE @Value Integer -- Int32 -SET @Value = -4 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 5 -DECLARE @Value Integer -- Int32 -SET @Value = -5 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 6 -DECLARE @Value Integer -- Int32 -SET @Value = -6 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 7 -DECLARE @Value Integer -- Int32 -SET @Value = -7 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 8 -DECLARE @Value Integer -- Int32 -SET @Value = -8 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL -DECLARE @Id Integer -- Int32 -SET @Id = 9 -DECLARE @Value Integer -- Int32 -SET @Value = -9 -DECLARE @ValueStr Text(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO "TableWithData" -( - "Id", - "Value", - "ValueStr" -) -VALUES -( - :Id, - :Value, - :ValueStr -) - -BeforeExecute --- PostgreSQL.16 PostgreSQL.15 PostgreSQL - -DROP TABLE IF EXISTS "TableWithData" +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +UPDATE + "TableWithData" +SET + "Id" = "TableWithData"."Id", + "Value" = "TableWithData"."Value" + 1, + "ValueStr" = "TableWithData"."ValueStr" || 'Upd' +WHERE + "TableWithData"."Id" = 3 +RETURNING + "TableWithData"."Value" diff --git a/PostgreSQL.16/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.16).sql b/PostgreSQL.16/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.16).sql new file mode 100644 index 000000000000..cd34380a46ec --- /dev/null +++ b/PostgreSQL.16/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(PostgreSQL.16).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.16/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.16).sql b/PostgreSQL.16/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.16).sql new file mode 100644 index 000000000000..64acaa114026 --- /dev/null +++ b/PostgreSQL.16/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(PostgreSQL.16).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/PostgreSQL.16/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.16).sql b/PostgreSQL.16/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.16).sql new file mode 100644 index 000000000000..64acaa114026 --- /dev/null +++ b/PostgreSQL.16/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(PostgreSQL.16).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- PostgreSQL.16 PostgreSQL.15 PostgreSQL (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + From 611e778c03a67d256264e804a98a56fa710bfba3 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 22:17:34 +0100 Subject: [PATCH 28/40] [Linux / Oracle 21c] baselines --- ...l4Async(Oracle.21.Managed.LinqService).sql | 18 ++ ...y2Async(Oracle.21.Managed.LinqService).sql | 30 +++ ...le1Test(Oracle.21.Managed.LinqService).sql | 9 + ...le2Test(Oracle.21.Managed.LinqService).sql | 11 + ...st1Test(Oracle.21.Managed.LinqService).sql | 9 + ...st2Test(Oracle.21.Managed.LinqService).sql | 11 + ...yncTest(Oracle.21.Managed.LinqService).sql | 18 ++ ...yncTest(Oracle.21.Managed.LinqService).sql | 15 ++ ...kipTest(Oracle.21.Managed.LinqService).sql | 16 ++ ...Default(Oracle.21.Managed.LinqService).sql | 20 ++ ...yncTest(Oracle.21.Managed.LinqService).sql | 21 ++ ...yncTest(Oracle.21.Managed.LinqService).sql | 21 ++ ...stAsync(Oracle.21.Managed.LinqService).sql | 40 ++++ ...tAsync2(Oracle.21.Managed.LinqService).sql | 40 ++++ ...ncdTest(Oracle.21.Managed.LinqService).sql | 16 ++ ...t3Async(Oracle.21.Managed.LinqService).sql | 28 +++ ...stAsync(Oracle.21.Managed.LinqService).sql | 36 +++ ...stAsync(Oracle.21.Managed.LinqService).sql | 24 ++ ...tAsync2(Oracle.21.Managed.LinqService).sql | 24 ++ ...tAsync1(Oracle.21.Managed.LinqService).sql | 28 +++ ...tAsync2(Oracle.21.Managed.LinqService).sql | 28 +++ ...stAsync(Oracle.21.Managed.LinqService).sql | 24 ++ ...tAsync2(Oracle.21.Managed.LinqService).sql | 24 ++ ...teAsync(Oracle.21.Managed.LinqService).sql | 197 ++-------------- ...teAsync(Oracle.21.Managed.LinqService).sql | 191 +--------------- ...teAsync(Oracle.21.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.21.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.21.Managed.LinqService).sql | 191 +--------------- ...orAsync(Oracle.21.Managed.LinqService).sql | 191 +--------------- ...orAsync(Oracle.21.Managed.LinqService).sql | 191 +--------------- ...teAsync(Oracle.21.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.21.Managed.LinqService).sql | 193 +--------------- ...t1Async(Oracle.21.Managed.LinqService).sql | 19 ++ ...ntAsync(Oracle.21.Managed.LinqService).sql | 97 ++++++++ ...edAsync(Oracle.21.Managed.LinqService).sql | 80 +++++++ ...t1Async(Oracle.21.Managed.LinqService).sql | 8 + ...t2Async(Oracle.21.Managed.LinqService).sql | 10 + ...x1Async(Oracle.21.Managed.LinqService).sql | 16 ++ ...sue4602(Oracle.21.Managed.LinqService).sql | 194 +--------------- ...7_Async(Oracle.21.Managed.LinqService).sql | 31 +++ ...saction(Oracle.21.Managed.LinqService).sql | 31 +++ ...onAsync(Oracle.21.Managed.LinqService).sql | 25 ++ ...t1Async(Oracle.21.Managed.LinqService).sql | 11 + ...18Async(Oracle.21.Managed.LinqService).sql | 14 ++ ...r1Async(Oracle.21.Managed.LinqService).sql | 7 + ...132Test(Oracle.21.Managed.LinqService).sql | 213 ++++++++++++++++++ ...c(Oracle.21.Managed.LinqService,False).sql | 16 ++ ...nc(Oracle.21.Managed.LinqService,True).sql | 16 ++ ...c(Oracle.21.Managed.LinqService,False).sql | 16 ++ ...nc(Oracle.21.Managed.LinqService,True).sql | 16 ++ ...p1Async(Oracle.21.Managed.LinqService).sql | 106 +-------- ...c(Oracle.21.Managed.LinqService,False).sql | 20 ++ ...nc(Oracle.21.Managed.LinqService,True).sql | 24 ++ ...c(Oracle.21.Managed.LinqService,False).sql | 12 + ...nc(Oracle.21.Managed.LinqService,True).sql | 12 + ...c(Oracle.21.Managed.LinqService,False).sql | 12 + ...nc(Oracle.21.Managed.LinqService,True).sql | 14 ++ ...c(Oracle.21.Managed.LinqService,False).sql | 12 + ...nc(Oracle.21.Managed.LinqService,True).sql | 14 ++ ...c(Oracle.21.Managed.LinqService,False).sql | 10 + ...nc(Oracle.21.Managed.LinqService,True).sql | 12 + ...Managed.LinqService,False,False,False).sql | 23 ++ ....Managed.LinqService,False,False,True).sql | 23 ++ ....Managed.LinqService,False,True,False).sql | 23 ++ ...1.Managed.LinqService,False,True,True).sql | 23 ++ ....Managed.LinqService,True,False,False).sql | 23 ++ ...1.Managed.LinqService,True,False,True).sql | 23 ++ ...1.Managed.LinqService,True,True,False).sql | 23 ++ ...21.Managed.LinqService,True,True,True).sql | 23 ++ ...e1Async(Oracle.21.Managed.LinqService).sql | 77 +++++++ ...leAsync(Oracle.21.Managed.LinqService).sql | 53 +++++ ...meAsync(Oracle.21.Managed.LinqService).sql | 132 +++++++++++ ...t2Async(Oracle.21.Managed.LinqService).sql | 44 ++++ ...t3Async(Oracle.21.Managed.LinqService).sql | 46 ++++ ...t4Async(Oracle.21.Managed.LinqService).sql | 46 ++++ ...meAsync(Oracle.21.Managed.LinqService).sql | 112 +++++++++ ...e1Async(Oracle.21.Managed.LinqService).sql | 98 ++++++++ ...meAsync(Oracle.21.Managed.LinqService).sql | 163 ++++++++++++++ ...e3Async(Oracle.21.Managed.LinqService).sql | 98 ++++++++ ...3xAsync(Oracle.21.Managed.LinqService).sql | 104 +++++++++ ...y1Async(Oracle.21.Managed.LinqService).sql | 15 ++ ...y2Async(Oracle.21.Managed.LinqService).sql | 15 ++ ...y4Async(Oracle.21.Managed.LinqService).sql | 34 +++ ...eryAsyn(Oracle.21.Managed.LinqService).sql | 33 +++ ...bleAsyn(Oracle.21.Managed.LinqService).sql | 31 +++ ...nsAsync(Oracle.21.Managed.LinqService).sql | 127 ++++++++--- ...llAsync(Oracle.21.Managed.LinqService).sql | 131 +++++------ ...rtAsync(Oracle.21.Managed.LinqService).sql | 126 +++++------ ...stAsync(Oracle.21.Managed.LinqService).sql | 85 ++++--- ...nc(Oracle.21.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.21.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.21.Managed.LinqService,two).sql | 80 ++++--- ...nc(Oracle.21.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.21.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.21.Managed.LinqService,two).sql | 80 ++++--- ...nc(Oracle.21.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.21.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.21.Managed.LinqService,two).sql | 80 ++++--- ...12Async(Oracle.21.Managed.LinqService).sql | 28 +++ ...e1Async(Oracle.21.Managed.LinqService).sql | 54 +++++ ...e2Async(Oracle.21.Managed.LinqService).sql | 54 +++++ ...e4Async(Oracle.21.Managed.LinqService).sql | 63 ++++++ ...n1Async(Oracle.21.Managed.LinqService).sql | 47 ++++ ...syncOld(Oracle.21.Managed.LinqService).sql | 47 ++++ ...meAsync(Oracle.21.Managed.LinqService).sql | 150 ++++++++++++ ...x1Async(Oracle.21.Managed.LinqService).sql | 57 +++++ ...inq.AsyncTests.Test(Oracle.21.Managed).sql | 18 ++ ...nq.AsyncTests.Test1(Oracle.21.Managed).sql | 9 + ...ncTests.TestForEach(Oracle.21.Managed).sql | 9 + 109 files changed, 3865 insertions(+), 2457 deletions(-) create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.21.Managed.LinqService,False).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.21.Managed.LinqService,True).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.21.Managed.LinqService,False).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.21.Managed.LinqService,True).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.21.Managed.LinqService,False).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.21.Managed.LinqService,True).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.21.Managed.LinqService,False).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.21.Managed.LinqService,True).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.21.Managed.LinqService,False).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.21.Managed.LinqService,True).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.21.Managed.LinqService,False).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.21.Managed.LinqService,True).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.21.Managed.LinqService).sql create mode 100644 Oracle.21.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.21.Managed).sql create mode 100644 Oracle.21.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.21.Managed).sql create mode 100644 Oracle.21.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.21.Managed).sql diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..f6356d20fb2d --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" <= 3 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..dd01d5fffbaf --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT DISTINCT + a_Parent1."ParentID" + FROM + "Child" t1 + INNER JOIN "Parent" a_Parent1 ON t1."ParentID" = a_Parent1."ParentID" + ) m_1 + INNER JOIN "Child" d + INNER JOIN "Parent" a_Parent1_1 ON d."ParentID" = a_Parent1_1."ParentID" + ON m_1."ParentID" = a_Parent1_1."ParentID" + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + a_Parent1."ParentID" +FROM + "Child" t1 + INNER JOIN "Parent" a_Parent1 ON t1."ParentID" = a_Parent1."ParentID" +GROUP BY + a_Parent1."ParentID" + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..de6cc14f90a0 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..d5fa84a1b789 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..de6cc14f90a0 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..d5fa84a1b789 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..ef832a88e3b3 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +SELECT + CASE + WHEN :ID IN ( + SELECT + t1."PersonID" + FROM + "Person" t1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..4c67cbab2be2 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."PersonID" = 1 +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.21.Managed.LinqService).sql index 5004613d1f11..6188d3f4c494 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.21.Managed.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY t1."ParentID" OFFSET :skip ROWS FETCH NEXT :take ROWS ONLY +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @skip Int32 +SET @skip = 1 +DECLARE @take Int32 +SET @take = 2 + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +ORDER BY + t1."ParentID" +OFFSET :skip ROWS FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..f016806d6a76 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 +DECLARE @p_1 Int32 +SET @p_1 = 2 +DECLARE @p_2 Int32 +SET @p_2 = 3 +DECLARE @param Int32 +SET @param = 4 + +SELECT + o."ParentID", + o."Value1" +FROM + "Parent" o +WHERE + o."ParentID" IN (:p, :p_1, :p_2) OR o."ParentID" = :param +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..43c0d6d162a9 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..43c0d6d162a9 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..1934753b79eb --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..1934753b79eb --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..75f5a9771dfb --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = :p +ORDER BY + x."ParentID" DESC +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..3c713a643bce --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT :p ROWS ONLY + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT :p ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..173e85590035 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..55a6928f2fe6 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..55a6928f2fe6 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..0a3e30213b54 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..0a3e30213b54 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..cf0becb11982 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..cf0becb11982 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.21.Managed.LinqService).sql index 615d89f91697..682a608c3ce5 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.21.Managed.LinqService).sql @@ -1,183 +1,20 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "AsyncDataTable" c_1 + WHERE + c_1."Id" = :p ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; + THEN 1 + ELSE 0 + END +FROM SYS.DUAL diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.21.Managed.LinqService).sql index 615d89f91697..0be7d1479ee3 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.21.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.21.Managed.LinqService).sql index 615d89f91697..4588f5c446bf 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.21.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 1 ROWS ONLY diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.21.Managed.LinqService).sql index 615d89f91697..4588f5c446bf 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.21.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 1 ROWS ONLY diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.21.Managed.LinqService).sql index 615d89f91697..0be7d1479ee3 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.21.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.21.Managed.LinqService).sql index 615d89f91697..5f4bece731e4 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.21.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MAX(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.21.Managed.LinqService).sql index 615d89f91697..29847ad88d49 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.21.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MIN(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.21.Managed.LinqService).sql index 615d89f91697..db7971bd4869 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.21.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.21.Managed.LinqService).sql index 615d89f91697..db7971bd4869 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.21.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..28d3a2da414f --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" = 1 +UNION ALL +SELECT + p_1."ParentID", + p_1."Value1" +FROM + "Parent" p_1 +WHERE + p_1."ParentID" = 2 + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.21.Managed.LinqService).sql index 5935fc43ac29..ed2ea83f42cf 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.21.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value Varchar2(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.21.Managed.LinqService).sql index c5b313e400bc..0bebd8f41130 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.21.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value Varchar2(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" r +SET + "Stamp" = r."Stamp" + 1, + "Value" = :Value +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" r +SET + "Stamp" = r."Stamp" + 1, + "Value" = :Value +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 @@ -28,6 +84,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 @@ -38,6 +106,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..50260718d74f --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" t1 + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..c35c9475cefe --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" > 2 + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..b30e6b35e820 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" c_1 + LEFT JOIN "Parent" a_Parent ON c_1."ParentID" = a_Parent."ParentID" + WHERE + a_Parent."ParentID" = t1."ParentID" + )) +FROM + "Parent" t1 + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.21.Managed.LinqService).sql index 71ab0ff032a8..69edce17cf49 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.21.Managed.LinqService).sql @@ -1,187 +1,11 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicParent" - ( - ID Int NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY (ID) - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -CREATE SEQUENCE "SIDENTITY_DynamicParent" - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -CREATE OR REPLACE TRIGGER "TIDENTITY_DynamicParent" -BEFORE INSERT ON "DynamicParent" FOR EACH ROW -BEGIN - SELECT "SIDENTITY_DynamicParent".NEXTVAL INTO :NEW.ID FROM dual; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicChild" - ( - ID Int NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY (ID) - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -CREATE SEQUENCE "SIDENTITY_DynamicChild" - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -CREATE OR REPLACE TRIGGER "TIDENTITY_DynamicChild" -BEFORE INSERT ON "DynamicChild" FOR EACH ROW -BEGIN - SELECT "SIDENTITY_DynamicChild".NEXTVAL INTO :NEW.ID FROM dual; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + it.ID +FROM + "DynamicParent" it + LEFT JOIN "DynamicChild" a_Child ON it.ID = a_Child."ParentID" +WHERE + a_Child.ID = 123 diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.21.Managed.LinqService).sql index 154a39f491ec..73f789742faa 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.21.Managed.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransactionAsync(ReadCommitted) BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.21.Managed.LinqService).sql index fd7e3c82fd0f..e77713c69d6d 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.21.Managed.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransaction BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..527011af28bf --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" a_Children + INNER JOIN "GrandChild" a_GrandChildren ON a_Children."ParentID" = a_GrandChildren."ParentID" AND a_Children."ChildID" = a_GrandChildren."ChildID" + WHERE + p."ParentID" = a_Children."ParentID" + ) +FROM + "Parent" p + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..62e6f9285b18 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +WHERE + t1."Value1" = 1 + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..d8701f7ee030 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT DISTINCT + p1."PersonID", + p1."Gender", + p1."FirstName", + p1."LastName" +FROM + "Person" p1 +WHERE + p1."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + p1."Gender" = 'F' + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..75e64b2c75ed --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,7 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + 1 +FROM SYS.DUAL + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..99ff245539b2 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."MiddleName", + COUNT(*) +FROM + "Person" x +WHERE + x."MiddleName" IS NOT NULL +GROUP BY + x."MiddleName" +UNION ALL +SELECT + x_1."MiddleName", + COUNT(*) +FROM + "Person" x_1 +WHERE + x_1."MiddleName" IS NOT NULL +GROUP BY + x_1."MiddleName" +UNION ALL +SELECT + x_2."MiddleName", + COUNT(*) +FROM + "Person" x_2 +WHERE + x_2."MiddleName" IS NOT NULL +GROUP BY + x_2."MiddleName" +UNION ALL +SELECT + x_3."MiddleName", + COUNT(*) +FROM + "Person" x_3 +WHERE + x_3."MiddleName" IS NOT NULL +GROUP BY + x_3."MiddleName" +UNION ALL +SELECT + x_4."MiddleName", + COUNT(*) +FROM + "Person" x_4 +WHERE + x_4."MiddleName" IS NOT NULL +GROUP BY + x_4."MiddleName" +UNION ALL +SELECT + x_5."MiddleName", + COUNT(*) +FROM + "Person" x_5 +WHERE + x_5."MiddleName" IS NOT NULL +GROUP BY + x_5."MiddleName" +UNION ALL +SELECT + x_6."MiddleName", + COUNT(*) +FROM + "Person" x_6 +WHERE + x_6."MiddleName" IS NOT NULL +GROUP BY + x_6."MiddleName" +UNION ALL +SELECT + x_7."MiddleName", + COUNT(*) +FROM + "Person" x_7 +WHERE + x_7."MiddleName" IS NOT NULL +GROUP BY + x_7."MiddleName" +UNION ALL +SELECT + x_8."MiddleName", + COUNT(*) +FROM + "Person" x_8 +WHERE + x_8."MiddleName" IS NOT NULL +GROUP BY + x_8."MiddleName" +UNION ALL +SELECT + x_9."MiddleName", + COUNT(*) +FROM + "Person" x_9 +WHERE + x_9."MiddleName" IS NOT NULL +GROUP BY + x_9."MiddleName" +UNION ALL +SELECT + x_10."MiddleName", + COUNT(*) +FROM + "Person" x_10 +WHERE + x_10."MiddleName" IS NOT NULL +GROUP BY + x_10."MiddleName" +UNION ALL +SELECT + x_11."MiddleName", + COUNT(*) +FROM + "Person" x_11 +WHERE + x_11."MiddleName" IS NOT NULL +GROUP BY + x_11."MiddleName" +UNION ALL +SELECT + x_12."MiddleName", + COUNT(*) +FROM + "Person" x_12 +WHERE + x_12."MiddleName" IS NOT NULL +GROUP BY + x_12."MiddleName" +UNION ALL +SELECT + x_13."MiddleName", + COUNT(*) +FROM + "Person" x_13 +WHERE + x_13."MiddleName" IS NOT NULL +GROUP BY + x_13."MiddleName" +UNION ALL +SELECT + x_14."MiddleName", + COUNT(*) +FROM + "Person" x_14 +WHERE + x_14."MiddleName" IS NOT NULL +GROUP BY + x_14."MiddleName" +UNION ALL +SELECT + x_15."MiddleName", + COUNT(*) +FROM + "Person" x_15 +WHERE + x_15."MiddleName" IS NOT NULL +GROUP BY + x_15."MiddleName" +UNION ALL +SELECT + x_16."MiddleName", + COUNT(*) +FROM + "Person" x_16 +WHERE + x_16."MiddleName" IS NOT NULL +GROUP BY + x_16."MiddleName" +UNION ALL +SELECT + x_17."MiddleName", + COUNT(*) +FROM + "Person" x_17 +WHERE + x_17."MiddleName" IS NOT NULL +GROUP BY + x_17."MiddleName" +UNION ALL +SELECT + x_18."MiddleName", + COUNT(*) +FROM + "Person" x_18 +WHERE + x_18."MiddleName" IS NOT NULL +GROUP BY + x_18."MiddleName" +UNION ALL +SELECT + x_19."MiddleName", + COUNT(*) +FROM + "Person" x_19 +WHERE + x_19."MiddleName" IS NOT NULL +GROUP BY + x_19."MiddleName" +UNION ALL +SELECT + x_20."MiddleName", + COUNT(*) +FROM + "Person" x_20 +WHERE + x_20."MiddleName" IS NOT NULL +GROUP BY + x_20."MiddleName" + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.21.Managed.LinqService,False).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.21.Managed.LinqService,False).sql new file mode 100644 index 000000000000..fd8c559e5bff --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.21.Managed.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.21.Managed.LinqService,True).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.21.Managed.LinqService,True).sql new file mode 100644 index 000000000000..fd8c559e5bff --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.21.Managed.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.21.Managed.LinqService,False).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.21.Managed.LinqService,False).sql new file mode 100644 index 000000000000..fd8c559e5bff --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.21.Managed.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.21.Managed.LinqService,True).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.21.Managed.LinqService,True).sql new file mode 100644 index 000000000000..fd8c559e5bff --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.21.Managed.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.21.Managed.LinqService).sql index 92ce07d91ffd..c97576480417 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.21.Managed.LinqService).sql @@ -1,97 +1,13 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "TakeSkipClass" - ( - "Value" VarChar(10) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @skip Int32 +SET @skip = 3 + +SELECT + t1."Value" as "Value_1" +FROM + "TakeSkipClass" t1 +ORDER BY + t1."Value" +OFFSET :skip ROWS diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.21.Managed.LinqService,False).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.21.Managed.LinqService,False).sql index 7503aeb6f9ed..23002043b952 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.21.Managed.LinqService,False).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.21.Managed.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" ch FETCH NEXT 3 ROWS ONLY +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.21.Managed.LinqService,True).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.21.Managed.LinqService,True).sql index 320573df3c70..d1eb28238748 100644 --- a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.21.Managed.LinqService,True).sql +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.21.Managed.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" ch FETCH NEXT :take ROWS ONLY +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 2 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT :take ROWS ONLY + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.21.Managed.LinqService,False).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.21.Managed.LinqService,False).sql new file mode 100644 index 000000000000..6e006421894a --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.21.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :n ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.21.Managed.LinqService,True).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.21.Managed.LinqService,True).sql new file mode 100644 index 000000000000..6e006421894a --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.21.Managed.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :n ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.21.Managed.LinqService,False).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.21.Managed.LinqService,False).sql new file mode 100644 index 000000000000..5798936ca8c6 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.21.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.21.Managed.LinqService,True).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.21.Managed.LinqService,True).sql new file mode 100644 index 000000000000..e4e3c9ef90c6 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.21.Managed.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.21.Managed.LinqService,False).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.21.Managed.LinqService,False).sql new file mode 100644 index 000000000000..c6fa4dcf88f6 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.21.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.21.Managed.LinqService,True).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.21.Managed.LinqService,True).sql new file mode 100644 index 000000000000..b54055d2b0b5 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.21.Managed.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.21.Managed.LinqService,False).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.21.Managed.LinqService,False).sql new file mode 100644 index 000000000000..0639cd352130 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.21.Managed.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.21.Managed.LinqService,True).sql b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.21.Managed.LinqService,True).sql new file mode 100644 index 000000000000..862d515ec053 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.21.Managed.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,False,False).sql b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,False,False).sql index 6093ce36499f..7c1c86edbe24 100644 --- a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,False,False).sql +++ b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,False,False).sql @@ -10,3 +10,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,False,True).sql b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,False,True).sql index 8e926ebb0706..64562aecfe4d 100644 --- a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,False,True).sql +++ b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,False,True).sql @@ -19,3 +19,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,True,False).sql b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,True,False).sql index 6093ce36499f..7c1c86edbe24 100644 --- a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,True,False).sql +++ b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,True,False).sql @@ -10,3 +10,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,True,True).sql b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,True,True).sql index 8e926ebb0706..64562aecfe4d 100644 --- a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,True,True).sql +++ b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,False,True,True).sql @@ -19,3 +19,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,False,False).sql b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,False,False).sql index faed2f8b0161..735d4e3c77e2 100644 --- a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,False,False).sql +++ b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,False,False).sql @@ -17,3 +17,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2"@"xe" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,False,True).sql b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,False,True).sql index f6af90363c9f..1f8e978a0f03 100644 --- a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,False,True).sql +++ b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,False,True).sql @@ -26,3 +26,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2"@"xe" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,True,False).sql b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,True,False).sql index faed2f8b0161..735d4e3c77e2 100644 --- a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,True,False).sql +++ b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,True,False).sql @@ -17,3 +17,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2"@"xe" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,True,True).sql b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,True,True).sql index f6af90363c9f..1f8e978a0f03 100644 --- a/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,True,True).sql +++ b/Oracle.21.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.21.Managed.LinqService,True,True,True).sql @@ -26,3 +26,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2"@"xe" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..f3ac1ff248b6 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,77 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "TestTable" +( + ID Int NOT NULL, + "Field1" VarChar(50) NULL, + "Field2" VarChar(255) NULL, + "CreatedOn" timestamp NULL, + + CONSTRAINT "PK_TestTable" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_TestTable" + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_TestTable" +BEFORE INSERT ON "TestTable" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_TestTable".NEXTVAL INTO :NEW.ID FROM dual; +END; + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1.ID, + t1."Field1", + t1."Field2", + t1."CreatedOn" +FROM + "TestTable" t1 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_TestTable"'; + EXECUTE IMMEDIATE 'DROP TABLE "TestTable"'; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.21.Managed.LinqService).sql index 140d55f07636..9635a7090134 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.21.Managed.LinqService).sql @@ -1,4 +1,45 @@ BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE ' + CREATE TABLE "TempTable" + ( + ID Int NOT NULL + ) + '; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -955 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "TempTable" +( + ID +) +SELECT + p."ParentID" +FROM + "Parent" p + +BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 SELECT @@ -7,3 +48,15 @@ FROM "Parent" p INNER JOIN "TempTable" t ON p."ParentID" = t.ID +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..81112afde798 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,132 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson_ol" t1 +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..90346c226f93 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..e17a2494e655 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..e17a2494e655 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.21.Managed.LinqService).sql index addc0a857bb8..f7ebc18aa604 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.21.Managed.LinqService).sql @@ -1,5 +1,59 @@ BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) DECLARE @FirstName Varchar2(6) -- String SET @FirstName = 'Steven' DECLARE @LastName Varchar2(4) -- String @@ -58,3 +112,61 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" p +WHERE + p."FirstName" = 'Steven' AND p."LastName" = 'King' AND + p."Gender" = 'M' + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.21.Managed.LinqService).sql index cd84b0d985f0..93ff4f2864b5 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.21.Managed.LinqService).sql @@ -38,3 +38,101 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc0' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc1' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc2' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..2b8139af4a24 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,163 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPatient" +( + "PersonID" Int NOT NULL, + "Diagnosis" VarChar(255) NULL, + + CONSTRAINT "PK_xxPatient" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.21.Managed.LinqService).sql index cd84b0d985f0..92a1d32b9135 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.21.Managed.LinqService).sql @@ -38,3 +38,101 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.21.Managed.LinqService).sql index cd84b0d985f0..4722fbbcdf8d 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.21.Managed.LinqService).sql @@ -38,3 +38,107 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 0 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 1 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 2 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.21.Managed.LinqService).sql index 871461889a67..9584ec145c8b 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.21.Managed.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.21.Managed.LinqService).sql index 871461889a67..9584ec145c8b 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.21.Managed.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.21.Managed.LinqService).sql index e7ab2333243f..fc86b0753db0 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.21.Managed.LinqService).sql @@ -36,6 +36,23 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Varchar2(5) -- String +SET @p = 'John0' + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) DECLARE @FirstName Varchar2(5) -- String @@ -66,6 +83,23 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Varchar2(5) -- String +SET @p = 'John1' + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.21.Managed.LinqService).sql index 775cd51c3981..0f0f145fdd4c 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.21.Managed.LinqService).sql @@ -218,6 +218,39 @@ VALUES :Field4 ) +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +MERGE INTO "TestMerge1" Target +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 + WHERE + t1."Id" = 5 +) "Source" +ON (Target."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.21.Managed.LinqService).sql index 775cd51c3981..5470915961c9 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.21.Managed.LinqService).sql @@ -218,6 +218,37 @@ VALUES :Field4 ) +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +MERGE INTO "TestMerge1" Target +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 +) "Source" +ON (Target."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Oracle.21.Managed Oracle.Managed Oracle12 diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.21.Managed.LinqService).sql index c69fb218461b..7c5c203affa7 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.21.Managed.LinqService).sql @@ -1,43 +1,98 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_N" < 0 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + 3002, + "source_N" + ) +SELECT + 42 as "source_N", + 3000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" t1 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 3002 BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT ALL +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + 4002, + "source_N" + ) +SELECT + 4000 as "source_ID", + 42 as "source_N" +FROM SYS.DUAL + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" t1 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 4001 OR x.ID = 4002 diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.21.Managed.LinqService).sql index ab4787ea96fc..3f2637607862 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.21.Managed.LinqService).sql @@ -1,85 +1,70 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" < 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) +WHEN 1 = 1 THEN + INTO "Dest2" + ( + ID, + "Int" + ) + VALUES + ( + "source_ID" + 3, + "source_ID" + 1 + ) +SELECT + 42 as "source_N", + 1000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 1001 BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest2" - ( - ID Int NOT NULL, - "Int" Int NOT NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest2" x +WHERE + x.ID = 1003 diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.21.Managed.LinqService).sql index ab4787ea96fc..60428a949ef6 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.21.Managed.LinqService).sql @@ -1,85 +1,65 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) + INTO "Dest2" + ( + ID, + "Int" + ) + VALUES + ( + "source_ID" + 3, + "source_ID" + 1 + ) +SELECT + 1000 as "source_ID", + 42 as "source_N" +FROM SYS.DUAL BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest2" - ( - ID Int NOT NULL, - "Int" Int NOT NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest2" x +WHERE + x.ID = 1003 diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.21.Managed.LinqService).sql index c69fb218461b..70574d0987cb 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.21.Managed.LinqService).sql @@ -1,43 +1,60 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT FIRST +WHEN "source_N" < 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) +ELSE + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 3, + "source_N" + ) +SELECT + 42 as "source_N", + 1000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 1003 diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.21.Managed.LinqService,null).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.21.Managed.LinqService,null).sql index c69fb218461b..e007e5be0483 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.21.Managed.LinqService,null).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.21.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2 -- String +SET @value = NULL -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.21.Managed.LinqService,one).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.21.Managed.LinqService,one).sql index c69fb218461b..06ba47a5918c 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.21.Managed.LinqService,one).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.21.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.21.Managed.LinqService,two).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.21.Managed.LinqService,two).sql index c69fb218461b..1d8a6da1efdc 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.21.Managed.LinqService,two).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.21.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.21.Managed.LinqService,null).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.21.Managed.LinqService,null).sql index c69fb218461b..e572eb94bd21 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.21.Managed.LinqService,null).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.21.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2 -- String +SET @value = NULL +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.21.Managed.LinqService,one).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.21.Managed.LinqService,one).sql index c69fb218461b..9ccab2a3e2e8 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.21.Managed.LinqService,one).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.21.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.21.Managed.LinqService,two).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.21.Managed.LinqService,two).sql index c69fb218461b..1748594cbc58 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.21.Managed.LinqService,two).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.21.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.21.Managed.LinqService,null).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.21.Managed.LinqService,null).sql index c69fb218461b..1562c23d15eb 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.21.Managed.LinqService,null).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.21.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2 -- String +SET @value = NULL -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.21.Managed.LinqService,one).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.21.Managed.LinqService,one).sql index c69fb218461b..ffbe722a8966 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.21.Managed.LinqService,one).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.21.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.21.Managed.LinqService,two).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.21.Managed.LinqService,two).sql index c69fb218461b..36e3b5b3ffc0 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.21.Managed.LinqService,two).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.21.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.21.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..b0daaf46d702 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = ( + SELECT + p2_1."ParentID" + FROM + "Parent" p1_1 + INNER JOIN "Parent" p2_1 ON p1_1."ParentID" = p2_1."ParentID" + WHERE + p1_1."ParentID" < 3 AND "Parent"."ParentID" = p1_1."ParentID" AND + ("Parent"."Value1" = p1_1."Value1" OR "Parent"."Value1" IS NULL AND p1_1."Value1" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "Parent" p1 + INNER JOIN "Parent" p2 ON p1."ParentID" = p2."ParentID" + WHERE + p1."ParentID" < 3 AND "Parent"."ParentID" = p1."ParentID" AND + ("Parent"."Value1" = p1."Value1" OR "Parent"."Value1" IS NULL AND p1."Value1" IS NULL) + ) + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..22ad963f0fef --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" p +SET + "ParentID" = p."ParentID" + 1 +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..22ad963f0fef --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" p +SET + "ParentID" = p."ParentID" + 1 +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..8a9c3e6fcf45 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +WHERE + EXISTS( + SELECT + * + FROM + "Child" c_1 + LEFT JOIN "Parent" a_Parent ON c_1."ParentID" = a_Parent."ParentID" + WHERE + c_1."ChildID" = :id AND + a_Parent."Value1" = 1 AND + "Child"."ParentID" = c_1."ParentID" AND + "Child"."ChildID" = c_1."ChildID" + ) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :p + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..9c2474241ab8 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" child_1 + LEFT JOIN "Parent" a_Parent ON child_1."ParentID" = a_Parent."ParentID" + WHERE + child_1."ChildID" = 10000 AND "Parent"."ParentID" = a_Parent."ParentID" AND + ("Parent"."Value1" = a_Parent."Value1" OR "Parent"."Value1" IS NULL AND a_Parent."Value1" IS NULL) + ) + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..9c2474241ab8 --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" child_1 + LEFT JOIN "Parent" a_Parent ON child_1."ParentID" = a_Parent."ParentID" + WHERE + child_1."ChildID" = 10000 AND "Parent"."ParentID" = a_Parent."ParentID" AND + ("Parent"."Value1" = a_Parent."Value1" OR "Parent"."Value1" IS NULL AND a_Parent."Value1" IS NULL) + ) + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.21.Managed.LinqService).sql new file mode 100644 index 000000000000..4d5451f381de --- /dev/null +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.21.Managed.LinqService).sql @@ -0,0 +1,150 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Int32 +SET @ID = 1 + +UPDATE + "xxPerson_ol" t1 +SET + "FirstName" = :FirstName, + "LastName" = :LastName, + "MiddleName" = :MiddleName, + "Gender" = :Gender +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + diff --git a/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.21.Managed.LinqService).sql b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.21.Managed.LinqService).sql index ef53006b695c..c67237e4c96c 100644 --- a/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.21.Managed.LinqService).sql +++ b/Oracle.21.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.21.Managed.LinqService).sql @@ -38,3 +38,60 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + t1."PersonID" as ID, + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Gender Varchar2(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName Varchar2(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName Varchar2 -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName Varchar2(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int32 +SET @ID = 5 + +UPDATE + "Person" t1 +SET + "Gender" = :Gender, + "FirstName" = :Name_FirstName, + "MiddleName" = :Name_MiddleName, + "LastName" = :Name_LastName +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + t1."PersonID" as ID, + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.21.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.21.Managed).sql b/Oracle.21.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.21.Managed).sql new file mode 100644 index 000000000000..001303097b83 --- /dev/null +++ b/Oracle.21.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.21.Managed).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.21.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.21.Managed).sql b/Oracle.21.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.21.Managed).sql new file mode 100644 index 000000000000..de6cc14f90a0 --- /dev/null +++ b/Oracle.21.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.21.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.21.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.21.Managed).sql b/Oracle.21.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.21.Managed).sql new file mode 100644 index 000000000000..de6cc14f90a0 --- /dev/null +++ b/Oracle.21.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.21.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.21.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + From 41deefb2cf5f733fb1897ae27a3911d69748e161 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 22:17:55 +0100 Subject: [PATCH 29/40] [Linux / Oracle 19c] baselines --- ...l4Async(Oracle.19.Managed.LinqService).sql | 18 ++ ...y2Async(Oracle.19.Managed.LinqService).sql | 30 +++ ...le1Test(Oracle.19.Managed.LinqService).sql | 9 + ...le2Test(Oracle.19.Managed.LinqService).sql | 11 + ...st1Test(Oracle.19.Managed.LinqService).sql | 9 + ...st2Test(Oracle.19.Managed.LinqService).sql | 11 + ...yncTest(Oracle.19.Managed.LinqService).sql | 18 ++ ...yncTest(Oracle.19.Managed.LinqService).sql | 15 ++ ...kipTest(Oracle.19.Managed.LinqService).sql | 16 ++ ...Default(Oracle.19.Managed.LinqService).sql | 20 ++ ...yncTest(Oracle.19.Managed.LinqService).sql | 21 ++ ...yncTest(Oracle.19.Managed.LinqService).sql | 21 ++ ...stAsync(Oracle.19.Managed.LinqService).sql | 40 ++++ ...tAsync2(Oracle.19.Managed.LinqService).sql | 40 ++++ ...ncdTest(Oracle.19.Managed.LinqService).sql | 16 ++ ...t3Async(Oracle.19.Managed.LinqService).sql | 28 +++ ...stAsync(Oracle.19.Managed.LinqService).sql | 36 +++ ...stAsync(Oracle.19.Managed.LinqService).sql | 24 ++ ...tAsync2(Oracle.19.Managed.LinqService).sql | 24 ++ ...tAsync1(Oracle.19.Managed.LinqService).sql | 28 +++ ...tAsync2(Oracle.19.Managed.LinqService).sql | 28 +++ ...stAsync(Oracle.19.Managed.LinqService).sql | 24 ++ ...tAsync2(Oracle.19.Managed.LinqService).sql | 24 ++ ...teAsync(Oracle.19.Managed.LinqService).sql | 197 ++-------------- ...teAsync(Oracle.19.Managed.LinqService).sql | 191 +--------------- ...teAsync(Oracle.19.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.19.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.19.Managed.LinqService).sql | 191 +--------------- ...orAsync(Oracle.19.Managed.LinqService).sql | 191 +--------------- ...orAsync(Oracle.19.Managed.LinqService).sql | 191 +--------------- ...teAsync(Oracle.19.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.19.Managed.LinqService).sql | 193 +--------------- ...t1Async(Oracle.19.Managed.LinqService).sql | 19 ++ ...ntAsync(Oracle.19.Managed.LinqService).sql | 97 ++++++++ ...edAsync(Oracle.19.Managed.LinqService).sql | 80 +++++++ ...t1Async(Oracle.19.Managed.LinqService).sql | 8 + ...t2Async(Oracle.19.Managed.LinqService).sql | 10 + ...x1Async(Oracle.19.Managed.LinqService).sql | 16 ++ ...sue4602(Oracle.19.Managed.LinqService).sql | 194 +--------------- ...7_Async(Oracle.19.Managed.LinqService).sql | 31 +++ ...saction(Oracle.19.Managed.LinqService).sql | 31 +++ ...onAsync(Oracle.19.Managed.LinqService).sql | 25 ++ ...t1Async(Oracle.19.Managed.LinqService).sql | 11 + ...18Async(Oracle.19.Managed.LinqService).sql | 14 ++ ...r1Async(Oracle.19.Managed.LinqService).sql | 7 + ...132Test(Oracle.19.Managed.LinqService).sql | 213 ++++++++++++++++++ ...c(Oracle.19.Managed.LinqService,False).sql | 16 ++ ...nc(Oracle.19.Managed.LinqService,True).sql | 16 ++ ...c(Oracle.19.Managed.LinqService,False).sql | 16 ++ ...nc(Oracle.19.Managed.LinqService,True).sql | 16 ++ ...p1Async(Oracle.19.Managed.LinqService).sql | 106 +-------- ...c(Oracle.19.Managed.LinqService,False).sql | 20 ++ ...nc(Oracle.19.Managed.LinqService,True).sql | 24 ++ ...c(Oracle.19.Managed.LinqService,False).sql | 12 + ...nc(Oracle.19.Managed.LinqService,True).sql | 12 + ...c(Oracle.19.Managed.LinqService,False).sql | 12 + ...nc(Oracle.19.Managed.LinqService,True).sql | 14 ++ ...c(Oracle.19.Managed.LinqService,False).sql | 12 + ...nc(Oracle.19.Managed.LinqService,True).sql | 14 ++ ...c(Oracle.19.Managed.LinqService,False).sql | 10 + ...nc(Oracle.19.Managed.LinqService,True).sql | 12 + ...Managed.LinqService,False,False,False).sql | 23 ++ ....Managed.LinqService,False,False,True).sql | 23 ++ ....Managed.LinqService,False,True,False).sql | 23 ++ ...9.Managed.LinqService,False,True,True).sql | 23 ++ ....Managed.LinqService,True,False,False).sql | 23 ++ ...9.Managed.LinqService,True,False,True).sql | 23 ++ ...9.Managed.LinqService,True,True,False).sql | 23 ++ ...19.Managed.LinqService,True,True,True).sql | 23 ++ ...e1Async(Oracle.19.Managed.LinqService).sql | 77 +++++++ ...leAsync(Oracle.19.Managed.LinqService).sql | 53 +++++ ...meAsync(Oracle.19.Managed.LinqService).sql | 132 +++++++++++ ...t2Async(Oracle.19.Managed.LinqService).sql | 44 ++++ ...t3Async(Oracle.19.Managed.LinqService).sql | 46 ++++ ...t4Async(Oracle.19.Managed.LinqService).sql | 46 ++++ ...meAsync(Oracle.19.Managed.LinqService).sql | 112 +++++++++ ...e1Async(Oracle.19.Managed.LinqService).sql | 98 ++++++++ ...meAsync(Oracle.19.Managed.LinqService).sql | 163 ++++++++++++++ ...e3Async(Oracle.19.Managed.LinqService).sql | 98 ++++++++ ...3xAsync(Oracle.19.Managed.LinqService).sql | 104 +++++++++ ...y1Async(Oracle.19.Managed.LinqService).sql | 15 ++ ...y2Async(Oracle.19.Managed.LinqService).sql | 15 ++ ...y4Async(Oracle.19.Managed.LinqService).sql | 34 +++ ...eryAsyn(Oracle.19.Managed.LinqService).sql | 33 +++ ...bleAsyn(Oracle.19.Managed.LinqService).sql | 31 +++ ...nsAsync(Oracle.19.Managed.LinqService).sql | 127 ++++++++--- ...llAsync(Oracle.19.Managed.LinqService).sql | 131 +++++------ ...rtAsync(Oracle.19.Managed.LinqService).sql | 126 +++++------ ...stAsync(Oracle.19.Managed.LinqService).sql | 85 ++++--- ...nc(Oracle.19.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.19.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.19.Managed.LinqService,two).sql | 80 ++++--- ...nc(Oracle.19.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.19.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.19.Managed.LinqService,two).sql | 80 ++++--- ...nc(Oracle.19.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.19.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.19.Managed.LinqService,two).sql | 80 ++++--- ...12Async(Oracle.19.Managed.LinqService).sql | 28 +++ ...e1Async(Oracle.19.Managed.LinqService).sql | 54 +++++ ...e2Async(Oracle.19.Managed.LinqService).sql | 54 +++++ ...e4Async(Oracle.19.Managed.LinqService).sql | 63 ++++++ ...n1Async(Oracle.19.Managed.LinqService).sql | 47 ++++ ...syncOld(Oracle.19.Managed.LinqService).sql | 47 ++++ ...meAsync(Oracle.19.Managed.LinqService).sql | 150 ++++++++++++ ...x1Async(Oracle.19.Managed.LinqService).sql | 57 +++++ ...inq.AsyncTests.Test(Oracle.19.Managed).sql | 18 ++ ...nq.AsyncTests.Test1(Oracle.19.Managed).sql | 9 + ...ncTests.TestForEach(Oracle.19.Managed).sql | 9 + 109 files changed, 3865 insertions(+), 2457 deletions(-) create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.19.Managed.LinqService,False).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.19.Managed.LinqService,True).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.19.Managed.LinqService,False).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.19.Managed.LinqService,True).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.19.Managed.LinqService,False).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.19.Managed.LinqService,True).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.19.Managed.LinqService,False).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.19.Managed.LinqService,True).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.19.Managed.LinqService,False).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.19.Managed.LinqService,True).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.19.Managed.LinqService,False).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.19.Managed.LinqService,True).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.19.Managed.LinqService).sql create mode 100644 Oracle.19.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.19.Managed).sql create mode 100644 Oracle.19.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.19.Managed).sql create mode 100644 Oracle.19.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.19.Managed).sql diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..83cdf6228192 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" <= 3 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..ef7506236a42 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT DISTINCT + a_Parent1."ParentID" + FROM + "Child" t1 + INNER JOIN "Parent" a_Parent1 ON t1."ParentID" = a_Parent1."ParentID" + ) m_1 + INNER JOIN "Child" d + INNER JOIN "Parent" a_Parent1_1 ON d."ParentID" = a_Parent1_1."ParentID" + ON m_1."ParentID" = a_Parent1_1."ParentID" + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + a_Parent1."ParentID" +FROM + "Child" t1 + INNER JOIN "Parent" a_Parent1 ON t1."ParentID" = a_Parent1."ParentID" +GROUP BY + a_Parent1."ParentID" + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..d995caf6c43f --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..52f384357ac9 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..d995caf6c43f --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..52f384357ac9 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..d94d233d176a --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +SELECT + CASE + WHEN :ID IN ( + SELECT + t1."PersonID" + FROM + "Person" t1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..fc9bab2a22b0 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."PersonID" = 1 +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.19.Managed.LinqService).sql index 649baa4e5549..066566d2993f 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.19.Managed.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY t1."ParentID" OFFSET :skip ROWS FETCH NEXT :take ROWS ONLY +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @skip Int32 +SET @skip = 1 +DECLARE @take Int32 +SET @take = 2 + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +ORDER BY + t1."ParentID" +OFFSET :skip ROWS FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..a6849f8afdbe --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 +DECLARE @p_1 Int32 +SET @p_1 = 2 +DECLARE @p_2 Int32 +SET @p_2 = 3 +DECLARE @param Int32 +SET @param = 4 + +SELECT + o."ParentID", + o."Value1" +FROM + "Parent" o +WHERE + o."ParentID" IN (:p, :p_1, :p_2) OR o."ParentID" = :param +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..aa1e23288ff6 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..aa1e23288ff6 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..061ca28c5196 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..061ca28c5196 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..59831e002ddf --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = :p +ORDER BY + x."ParentID" DESC +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..4f7dbb997995 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT :p ROWS ONLY + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT :p ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..9d2a9c262361 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..0c426a1d830b --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..0c426a1d830b --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..22161cf4327c --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..22161cf4327c --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..5804e90c1cb2 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..5804e90c1cb2 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.19.Managed.LinqService).sql index 4f2971da7456..0435fc38846e 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.19.Managed.LinqService).sql @@ -1,183 +1,20 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "AsyncDataTable" c_1 + WHERE + c_1."Id" = :p ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; + THEN 1 + ELSE 0 + END +FROM SYS.DUAL diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.19.Managed.LinqService).sql index 4f2971da7456..2ac8e3f1d0dd 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.19.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.19.Managed.LinqService).sql index 4f2971da7456..5df9f276c3b9 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.19.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 1 ROWS ONLY diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.19.Managed.LinqService).sql index 4f2971da7456..5df9f276c3b9 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.19.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 1 ROWS ONLY diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.19.Managed.LinqService).sql index 4f2971da7456..2ac8e3f1d0dd 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.19.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.19.Managed.LinqService).sql index 4f2971da7456..2e1fd77fa3b4 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.19.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MAX(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.19.Managed.LinqService).sql index 4f2971da7456..5cbdfaea8e6a 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.19.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MIN(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.19.Managed.LinqService).sql index 4f2971da7456..2eedfb78ec35 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.19.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.19.Managed.LinqService).sql index 4f2971da7456..2eedfb78ec35 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.19.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..7e79635851b1 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" = 1 +UNION ALL +SELECT + p_1."ParentID", + p_1."Value1" +FROM + "Parent" p_1 +WHERE + p_1."ParentID" = 2 + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.19.Managed.LinqService).sql index 61b261532e7f..4a5edf208ef0 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.19.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value Varchar2(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.19.Managed.LinqService).sql index 88dbabe941ba..7a44c0bdcfc0 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.19.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value Varchar2(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" r +SET + "Stamp" = r."Stamp" + 1, + "Value" = :Value +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" r +SET + "Stamp" = r."Stamp" + 1, + "Value" = :Value +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 @@ -28,6 +84,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 @@ -38,6 +106,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..a9099092bf57 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" t1 + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..0525c6967c4d --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" > 2 + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..dcb098cabffd --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" c_1 + LEFT JOIN "Parent" a_Parent ON c_1."ParentID" = a_Parent."ParentID" + WHERE + a_Parent."ParentID" = t1."ParentID" + )) +FROM + "Parent" t1 + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.19.Managed.LinqService).sql index 1082c77549e6..ea7cf08ca446 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.19.Managed.LinqService).sql @@ -1,187 +1,11 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicParent" - ( - ID Int NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY (ID) - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -CREATE SEQUENCE "SIDENTITY_DynamicParent" - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -CREATE OR REPLACE TRIGGER "TIDENTITY_DynamicParent" -BEFORE INSERT ON "DynamicParent" FOR EACH ROW -BEGIN - SELECT "SIDENTITY_DynamicParent".NEXTVAL INTO :NEW.ID FROM dual; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicChild" - ( - ID Int NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY (ID) - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -CREATE SEQUENCE "SIDENTITY_DynamicChild" - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -CREATE OR REPLACE TRIGGER "TIDENTITY_DynamicChild" -BEFORE INSERT ON "DynamicChild" FOR EACH ROW -BEGIN - SELECT "SIDENTITY_DynamicChild".NEXTVAL INTO :NEW.ID FROM dual; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + it.ID +FROM + "DynamicParent" it + LEFT JOIN "DynamicChild" a_Child ON it.ID = a_Child."ParentID" +WHERE + a_Child.ID = 123 diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.19.Managed.LinqService).sql index 43898adf5172..15cc9cd7bb77 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.19.Managed.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransactionAsync(ReadCommitted) BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.19.Managed.LinqService).sql index 7101007e8fed..868c28453e24 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.19.Managed.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransaction BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..fcf3ba18ad95 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" a_Children + INNER JOIN "GrandChild" a_GrandChildren ON a_Children."ParentID" = a_GrandChildren."ParentID" AND a_Children."ChildID" = a_GrandChildren."ChildID" + WHERE + p."ParentID" = a_Children."ParentID" + ) +FROM + "Parent" p + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..9aa66ec914c3 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +WHERE + t1."Value1" = 1 + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..9de7133bc521 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT DISTINCT + p1."PersonID", + p1."Gender", + p1."FirstName", + p1."LastName" +FROM + "Person" p1 +WHERE + p1."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + p1."Gender" = 'F' + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..ee07283316b2 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,7 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + 1 +FROM SYS.DUAL + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..b12767b9ce2d --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."MiddleName", + COUNT(*) +FROM + "Person" x +WHERE + x."MiddleName" IS NOT NULL +GROUP BY + x."MiddleName" +UNION ALL +SELECT + x_1."MiddleName", + COUNT(*) +FROM + "Person" x_1 +WHERE + x_1."MiddleName" IS NOT NULL +GROUP BY + x_1."MiddleName" +UNION ALL +SELECT + x_2."MiddleName", + COUNT(*) +FROM + "Person" x_2 +WHERE + x_2."MiddleName" IS NOT NULL +GROUP BY + x_2."MiddleName" +UNION ALL +SELECT + x_3."MiddleName", + COUNT(*) +FROM + "Person" x_3 +WHERE + x_3."MiddleName" IS NOT NULL +GROUP BY + x_3."MiddleName" +UNION ALL +SELECT + x_4."MiddleName", + COUNT(*) +FROM + "Person" x_4 +WHERE + x_4."MiddleName" IS NOT NULL +GROUP BY + x_4."MiddleName" +UNION ALL +SELECT + x_5."MiddleName", + COUNT(*) +FROM + "Person" x_5 +WHERE + x_5."MiddleName" IS NOT NULL +GROUP BY + x_5."MiddleName" +UNION ALL +SELECT + x_6."MiddleName", + COUNT(*) +FROM + "Person" x_6 +WHERE + x_6."MiddleName" IS NOT NULL +GROUP BY + x_6."MiddleName" +UNION ALL +SELECT + x_7."MiddleName", + COUNT(*) +FROM + "Person" x_7 +WHERE + x_7."MiddleName" IS NOT NULL +GROUP BY + x_7."MiddleName" +UNION ALL +SELECT + x_8."MiddleName", + COUNT(*) +FROM + "Person" x_8 +WHERE + x_8."MiddleName" IS NOT NULL +GROUP BY + x_8."MiddleName" +UNION ALL +SELECT + x_9."MiddleName", + COUNT(*) +FROM + "Person" x_9 +WHERE + x_9."MiddleName" IS NOT NULL +GROUP BY + x_9."MiddleName" +UNION ALL +SELECT + x_10."MiddleName", + COUNT(*) +FROM + "Person" x_10 +WHERE + x_10."MiddleName" IS NOT NULL +GROUP BY + x_10."MiddleName" +UNION ALL +SELECT + x_11."MiddleName", + COUNT(*) +FROM + "Person" x_11 +WHERE + x_11."MiddleName" IS NOT NULL +GROUP BY + x_11."MiddleName" +UNION ALL +SELECT + x_12."MiddleName", + COUNT(*) +FROM + "Person" x_12 +WHERE + x_12."MiddleName" IS NOT NULL +GROUP BY + x_12."MiddleName" +UNION ALL +SELECT + x_13."MiddleName", + COUNT(*) +FROM + "Person" x_13 +WHERE + x_13."MiddleName" IS NOT NULL +GROUP BY + x_13."MiddleName" +UNION ALL +SELECT + x_14."MiddleName", + COUNT(*) +FROM + "Person" x_14 +WHERE + x_14."MiddleName" IS NOT NULL +GROUP BY + x_14."MiddleName" +UNION ALL +SELECT + x_15."MiddleName", + COUNT(*) +FROM + "Person" x_15 +WHERE + x_15."MiddleName" IS NOT NULL +GROUP BY + x_15."MiddleName" +UNION ALL +SELECT + x_16."MiddleName", + COUNT(*) +FROM + "Person" x_16 +WHERE + x_16."MiddleName" IS NOT NULL +GROUP BY + x_16."MiddleName" +UNION ALL +SELECT + x_17."MiddleName", + COUNT(*) +FROM + "Person" x_17 +WHERE + x_17."MiddleName" IS NOT NULL +GROUP BY + x_17."MiddleName" +UNION ALL +SELECT + x_18."MiddleName", + COUNT(*) +FROM + "Person" x_18 +WHERE + x_18."MiddleName" IS NOT NULL +GROUP BY + x_18."MiddleName" +UNION ALL +SELECT + x_19."MiddleName", + COUNT(*) +FROM + "Person" x_19 +WHERE + x_19."MiddleName" IS NOT NULL +GROUP BY + x_19."MiddleName" +UNION ALL +SELECT + x_20."MiddleName", + COUNT(*) +FROM + "Person" x_20 +WHERE + x_20."MiddleName" IS NOT NULL +GROUP BY + x_20."MiddleName" + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.19.Managed.LinqService,False).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.19.Managed.LinqService,False).sql new file mode 100644 index 000000000000..b4f2dfb36edd --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.19.Managed.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.19.Managed.LinqService,True).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.19.Managed.LinqService,True).sql new file mode 100644 index 000000000000..b4f2dfb36edd --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.19.Managed.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.19.Managed.LinqService,False).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.19.Managed.LinqService,False).sql new file mode 100644 index 000000000000..b4f2dfb36edd --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.19.Managed.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.19.Managed.LinqService,True).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.19.Managed.LinqService,True).sql new file mode 100644 index 000000000000..b4f2dfb36edd --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.19.Managed.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.19.Managed.LinqService).sql index f7197ae40cb4..0e518314eaab 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.19.Managed.LinqService).sql @@ -1,97 +1,13 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "TakeSkipClass" - ( - "Value" VarChar(10) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @skip Int32 +SET @skip = 3 + +SELECT + t1."Value" as "Value_1" +FROM + "TakeSkipClass" t1 +ORDER BY + t1."Value" +OFFSET :skip ROWS diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.19.Managed.LinqService,False).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.19.Managed.LinqService,False).sql index d39c7f008010..470de4625916 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.19.Managed.LinqService,False).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.19.Managed.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" ch FETCH NEXT 3 ROWS ONLY +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.19.Managed.LinqService,True).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.19.Managed.LinqService,True).sql index ecf620776cf3..cd3962ffcc0e 100644 --- a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.19.Managed.LinqService,True).sql +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.19.Managed.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" ch FETCH NEXT :take ROWS ONLY +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 2 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT :take ROWS ONLY + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.19.Managed.LinqService,False).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.19.Managed.LinqService,False).sql new file mode 100644 index 000000000000..12572503fc80 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.19.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :n ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.19.Managed.LinqService,True).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.19.Managed.LinqService,True).sql new file mode 100644 index 000000000000..12572503fc80 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.19.Managed.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :n ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.19.Managed.LinqService,False).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.19.Managed.LinqService,False).sql new file mode 100644 index 000000000000..098b1bf8fd35 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.19.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.19.Managed.LinqService,True).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.19.Managed.LinqService,True).sql new file mode 100644 index 000000000000..de15d87278a2 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.19.Managed.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.19.Managed.LinqService,False).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.19.Managed.LinqService,False).sql new file mode 100644 index 000000000000..0b4523caeedf --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.19.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.19.Managed.LinqService,True).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.19.Managed.LinqService,True).sql new file mode 100644 index 000000000000..a8974d3ce023 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.19.Managed.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.19.Managed.LinqService,False).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.19.Managed.LinqService,False).sql new file mode 100644 index 000000000000..f0f679d33cdb --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.19.Managed.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.19.Managed.LinqService,True).sql b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.19.Managed.LinqService,True).sql new file mode 100644 index 000000000000..07a30418afec --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.19.Managed.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,False,False).sql b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,False,False).sql index ca22cea753e3..ea3ed1efe13b 100644 --- a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,False,False).sql +++ b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,False,False).sql @@ -10,3 +10,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,False,True).sql b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,False,True).sql index ec9f943d252a..1c4e60385dd8 100644 --- a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,False,True).sql +++ b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,False,True).sql @@ -19,3 +19,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,True,False).sql b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,True,False).sql index ca22cea753e3..ea3ed1efe13b 100644 --- a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,True,False).sql +++ b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,True,False).sql @@ -10,3 +10,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,True,True).sql b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,True,True).sql index ec9f943d252a..1c4e60385dd8 100644 --- a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,True,True).sql +++ b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,False,True,True).sql @@ -19,3 +19,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,False,False).sql b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,False,False).sql index fbcfceb66708..f838eda2e975 100644 --- a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,False,False).sql +++ b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,False,False).sql @@ -17,3 +17,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2"@XE +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,False,True).sql b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,False,True).sql index cb9c1d4fa15d..4f50515b93b6 100644 --- a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,False,True).sql +++ b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,False,True).sql @@ -26,3 +26,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2"@XE +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,True,False).sql b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,True,False).sql index fbcfceb66708..f838eda2e975 100644 --- a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,True,False).sql +++ b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,True,False).sql @@ -17,3 +17,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2"@XE +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,True,True).sql b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,True,True).sql index cb9c1d4fa15d..4f50515b93b6 100644 --- a/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,True,True).sql +++ b/Oracle.19.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.19.Managed.LinqService,True,True,True).sql @@ -26,3 +26,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2"@XE +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..85ad05f143c5 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,77 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "TestTable" +( + ID Int NOT NULL, + "Field1" VarChar(50) NULL, + "Field2" VarChar(255) NULL, + "CreatedOn" timestamp NULL, + + CONSTRAINT "PK_TestTable" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_TestTable" + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_TestTable" +BEFORE INSERT ON "TestTable" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_TestTable".NEXTVAL INTO :NEW.ID FROM dual; +END; + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1.ID, + t1."Field1", + t1."Field2", + t1."CreatedOn" +FROM + "TestTable" t1 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_TestTable"'; + EXECUTE IMMEDIATE 'DROP TABLE "TestTable"'; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.19.Managed.LinqService).sql index fa5bcdcd9e00..8e9212d6c4e4 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.19.Managed.LinqService).sql @@ -1,4 +1,45 @@ BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE ' + CREATE TABLE "TempTable" + ( + ID Int NOT NULL + ) + '; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -955 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "TempTable" +( + ID +) +SELECT + p."ParentID" +FROM + "Parent" p + +BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 SELECT @@ -7,3 +48,15 @@ FROM "Parent" p INNER JOIN "TempTable" t ON p."ParentID" = t.ID +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..fdb834161086 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,132 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson_ol" t1 +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..e7df755b79c9 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..f0d140a45c86 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..f0d140a45c86 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.19.Managed.LinqService).sql index dbc465a2a976..66003080bf4b 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.19.Managed.LinqService).sql @@ -1,5 +1,59 @@ BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) DECLARE @FirstName Varchar2(6) -- String SET @FirstName = 'Steven' DECLARE @LastName Varchar2(4) -- String @@ -58,3 +112,61 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" p +WHERE + p."FirstName" = 'Steven' AND p."LastName" = 'King' AND + p."Gender" = 'M' + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.19.Managed.LinqService).sql index bd626e1d6e42..89e2a8d1c7ad 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.19.Managed.LinqService).sql @@ -38,3 +38,101 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc0' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc1' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc2' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..e839888fa533 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,163 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPatient" +( + "PersonID" Int NOT NULL, + "Diagnosis" VarChar(255) NULL, + + CONSTRAINT "PK_xxPatient" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.19.Managed.LinqService).sql index bd626e1d6e42..63e73bcec01a 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.19.Managed.LinqService).sql @@ -38,3 +38,101 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.19.Managed.LinqService).sql index bd626e1d6e42..400650423192 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.19.Managed.LinqService).sql @@ -38,3 +38,107 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 0 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 1 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 2 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.19.Managed.LinqService).sql index 28f7c5d5c1ac..9eea5efbe523 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.19.Managed.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.19.Managed.LinqService).sql index 28f7c5d5c1ac..9eea5efbe523 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.19.Managed.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.19.Managed.LinqService).sql index 62e9b9e81a5c..7750d0ea752a 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.19.Managed.LinqService).sql @@ -36,6 +36,23 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Varchar2(5) -- String +SET @p = 'John0' + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) DECLARE @FirstName Varchar2(5) -- String @@ -66,6 +83,23 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Varchar2(5) -- String +SET @p = 'John1' + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.19.Managed.LinqService).sql index 680d4a695ff1..b0923c68f9b2 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.19.Managed.LinqService).sql @@ -218,6 +218,39 @@ VALUES :Field4 ) +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +MERGE INTO "TestMerge1" Target +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 + WHERE + t1."Id" = 5 +) "Source" +ON (Target."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.19.Managed.LinqService).sql index 680d4a695ff1..48ce07b687f5 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.19.Managed.LinqService).sql @@ -218,6 +218,37 @@ VALUES :Field4 ) +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +MERGE INTO "TestMerge1" Target +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 +) "Source" +ON (Target."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Oracle.19.Managed Oracle.Managed Oracle12 diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.19.Managed.LinqService).sql index 6a20e9ab4688..ba88a8b02836 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.19.Managed.LinqService).sql @@ -1,43 +1,98 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_N" < 0 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + 3002, + "source_N" + ) +SELECT + 42 as "source_N", + 3000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" t1 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 3002 BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT ALL +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + 4002, + "source_N" + ) +SELECT + 4000 as "source_ID", + 42 as "source_N" +FROM SYS.DUAL + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" t1 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 4001 OR x.ID = 4002 diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.19.Managed.LinqService).sql index da3b08afd866..ee520e9b23f3 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.19.Managed.LinqService).sql @@ -1,85 +1,70 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" < 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) +WHEN 1 = 1 THEN + INTO "Dest2" + ( + ID, + "Int" + ) + VALUES + ( + "source_ID" + 3, + "source_ID" + 1 + ) +SELECT + 42 as "source_N", + 1000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 1001 BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest2" - ( - ID Int NOT NULL, - "Int" Int NOT NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest2" x +WHERE + x.ID = 1003 diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.19.Managed.LinqService).sql index da3b08afd866..4851767c36d1 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.19.Managed.LinqService).sql @@ -1,85 +1,65 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) + INTO "Dest2" + ( + ID, + "Int" + ) + VALUES + ( + "source_ID" + 3, + "source_ID" + 1 + ) +SELECT + 1000 as "source_ID", + 42 as "source_N" +FROM SYS.DUAL BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest2" - ( - ID Int NOT NULL, - "Int" Int NOT NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest2" x +WHERE + x.ID = 1003 diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.19.Managed.LinqService).sql index 6a20e9ab4688..78de5d73c2c1 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.19.Managed.LinqService).sql @@ -1,43 +1,60 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT FIRST +WHEN "source_N" < 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) +ELSE + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 3, + "source_N" + ) +SELECT + 42 as "source_N", + 1000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 1003 diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.19.Managed.LinqService,null).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.19.Managed.LinqService,null).sql index 6a20e9ab4688..cec65316f252 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.19.Managed.LinqService,null).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.19.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2 -- String +SET @value = NULL -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.19.Managed.LinqService,one).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.19.Managed.LinqService,one).sql index 6a20e9ab4688..859e30cc7533 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.19.Managed.LinqService,one).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.19.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.19.Managed.LinqService,two).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.19.Managed.LinqService,two).sql index 6a20e9ab4688..10cebe4f9a77 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.19.Managed.LinqService,two).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.19.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.19.Managed.LinqService,null).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.19.Managed.LinqService,null).sql index 6a20e9ab4688..26a5f93d251b 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.19.Managed.LinqService,null).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.19.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2 -- String +SET @value = NULL +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.19.Managed.LinqService,one).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.19.Managed.LinqService,one).sql index 6a20e9ab4688..17996d998e4a 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.19.Managed.LinqService,one).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.19.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.19.Managed.LinqService,two).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.19.Managed.LinqService,two).sql index 6a20e9ab4688..013ef8e3c62d 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.19.Managed.LinqService,two).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.19.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.19.Managed.LinqService,null).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.19.Managed.LinqService,null).sql index 6a20e9ab4688..588b71276219 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.19.Managed.LinqService,null).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.19.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2 -- String +SET @value = NULL -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.19.Managed.LinqService,one).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.19.Managed.LinqService,one).sql index 6a20e9ab4688..8977bc082f0d 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.19.Managed.LinqService,one).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.19.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.19.Managed.LinqService,two).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.19.Managed.LinqService,two).sql index 6a20e9ab4688..333210cf4ba0 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.19.Managed.LinqService,two).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.19.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.19.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..d6f865940b27 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = ( + SELECT + p2_1."ParentID" + FROM + "Parent" p1_1 + INNER JOIN "Parent" p2_1 ON p1_1."ParentID" = p2_1."ParentID" + WHERE + p1_1."ParentID" < 3 AND "Parent"."ParentID" = p1_1."ParentID" AND + ("Parent"."Value1" = p1_1."Value1" OR "Parent"."Value1" IS NULL AND p1_1."Value1" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "Parent" p1 + INNER JOIN "Parent" p2 ON p1."ParentID" = p2."ParentID" + WHERE + p1."ParentID" < 3 AND "Parent"."ParentID" = p1."ParentID" AND + ("Parent"."Value1" = p1."Value1" OR "Parent"."Value1" IS NULL AND p1."Value1" IS NULL) + ) + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..ad51e7dda7c0 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" p +SET + "ParentID" = p."ParentID" + 1 +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..ad51e7dda7c0 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" p +SET + "ParentID" = p."ParentID" + 1 +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..332ccdecdaf6 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +WHERE + EXISTS( + SELECT + * + FROM + "Child" c_1 + LEFT JOIN "Parent" a_Parent ON c_1."ParentID" = a_Parent."ParentID" + WHERE + c_1."ChildID" = :id AND + a_Parent."Value1" = 1 AND + "Child"."ParentID" = c_1."ParentID" AND + "Child"."ChildID" = c_1."ChildID" + ) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :p + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..ebf6a3c2bce1 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" child_1 + LEFT JOIN "Parent" a_Parent ON child_1."ParentID" = a_Parent."ParentID" + WHERE + child_1."ChildID" = 10000 AND "Parent"."ParentID" = a_Parent."ParentID" AND + ("Parent"."Value1" = a_Parent."Value1" OR "Parent"."Value1" IS NULL AND a_Parent."Value1" IS NULL) + ) + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..ebf6a3c2bce1 --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" child_1 + LEFT JOIN "Parent" a_Parent ON child_1."ParentID" = a_Parent."ParentID" + WHERE + child_1."ChildID" = 10000 AND "Parent"."ParentID" = a_Parent."ParentID" AND + ("Parent"."Value1" = a_Parent."Value1" OR "Parent"."Value1" IS NULL AND a_Parent."Value1" IS NULL) + ) + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.19.Managed.LinqService).sql new file mode 100644 index 000000000000..56b4b75d933b --- /dev/null +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.19.Managed.LinqService).sql @@ -0,0 +1,150 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Int32 +SET @ID = 1 + +UPDATE + "xxPerson_ol" t1 +SET + "FirstName" = :FirstName, + "LastName" = :LastName, + "MiddleName" = :MiddleName, + "Gender" = :Gender +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + diff --git a/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.19.Managed.LinqService).sql b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.19.Managed.LinqService).sql index fac9311b5391..c56dd8d3d145 100644 --- a/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.19.Managed.LinqService).sql +++ b/Oracle.19.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.19.Managed.LinqService).sql @@ -38,3 +38,60 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + t1."PersonID" as ID, + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Gender Varchar2(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName Varchar2(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName Varchar2 -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName Varchar2(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int32 +SET @ID = 5 + +UPDATE + "Person" t1 +SET + "Gender" = :Gender, + "FirstName" = :Name_FirstName, + "MiddleName" = :Name_MiddleName, + "LastName" = :Name_LastName +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + t1."PersonID" as ID, + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.19.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.19.Managed).sql b/Oracle.19.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.19.Managed).sql new file mode 100644 index 000000000000..2211aa1aaf36 --- /dev/null +++ b/Oracle.19.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.19.Managed).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.19.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.19.Managed).sql b/Oracle.19.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.19.Managed).sql new file mode 100644 index 000000000000..d995caf6c43f --- /dev/null +++ b/Oracle.19.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.19.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.19.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.19.Managed).sql b/Oracle.19.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.19.Managed).sql new file mode 100644 index 000000000000..d995caf6c43f --- /dev/null +++ b/Oracle.19.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.19.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.19.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + From 577718a5dcce024a8e07a3d0d1d0a0910df05a7c Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 21:18:44 +0000 Subject: [PATCH 30/40] [Windows / Access ACE (OLEDB/ODBC) x86] baselines --- ...All4Async(Access.Ace.Odbc.LinqService).sql | 10 + ...pBy2Async(Access.Ace.Odbc.LinqService).sql | 31 +++ ...able1Test(Access.Ace.Odbc.LinqService).sql | 9 + ...able2Test(Access.Ace.Odbc.LinqService).sql | 11 + ...Cast1Test(Access.Ace.Odbc.LinqService).sql | 9 + ...Cast2Test(Access.Ace.Odbc.LinqService).sql | 11 + ...AsyncTest(Access.Ace.Odbc.LinqService).sql | 12 + ...AsyncTest(Access.Ace.Odbc.LinqService).sql | 14 ++ ...eSkipTest(Access.Ace.Odbc.LinqService).sql | 11 + ...OrDefault(Access.Ace.Odbc.LinqService).sql | 19 ++ ...AsyncTest(Access.Ace.Odbc.LinqService).sql | 21 ++ ...AsyncTest(Access.Ace.Odbc.LinqService).sql | 21 ++ ...TestAsync(Access.Ace.Odbc.LinqService).sql | 24 ++ ...estAsync2(Access.Ace.Odbc.LinqService).sql | 24 ++ ...syncdTest(Access.Ace.Odbc.LinqService).sql | 15 ++ ...est3Async(Access.Ace.Odbc.LinqService).sql | 26 +++ ...TestAsync(Access.Ace.Odbc.LinqService).sql | 24 ++ ...TestAsync(Access.Ace.Odbc.LinqService).sql | 24 ++ ...estAsync2(Access.Ace.Odbc.LinqService).sql | 24 ++ ...estAsync1(Access.Ace.Odbc.LinqService).sql | 26 +++ ...estAsync2(Access.Ace.Odbc.LinqService).sql | 26 +++ ...TestAsync(Access.Ace.Odbc.LinqService).sql | 24 ++ ...estAsync2(Access.Ace.Odbc.LinqService).sql | 24 ++ ...cateAsync(Access.Ace.Odbc.LinqService).sql | 168 +------------- ...cateAsync(Access.Ace.Odbc.LinqService).sql | 168 +------------- ...cateAsync(Access.Ace.Odbc.LinqService).sql | 171 ++------------ ...cateAsync(Access.Ace.Odbc.LinqService).sql | 171 ++------------ ...cateAsync(Access.Ace.Odbc.LinqService).sql | 168 +------------- ...ctorAsync(Access.Ace.Odbc.LinqService).sql | 168 +------------- ...ctorAsync(Access.Ace.Odbc.LinqService).sql | 168 +------------- ...cateAsync(Access.Ace.Odbc.LinqService).sql | 171 ++------------ ...cateAsync(Access.Ace.Odbc.LinqService).sql | 171 ++------------ ...cat1Async(Access.Ace.Odbc.LinqService).sql | 19 ++ ...mentAsync(Access.Ace.Odbc.LinqService).sql | 97 ++++++++ ...eredAsync(Access.Ace.Odbc.LinqService).sql | 80 +++++++ ...unt1Async(Access.Ace.Odbc.LinqService).sql | 8 + ...unt2Async(Access.Ace.Odbc.LinqService).sql | 10 + ...Max1Async(Access.Ace.Odbc.LinqService).sql | 16 ++ ...Issue4602(Access.Ace.Odbc.LinqService).sql | 48 +--- ...057_Async(Access.Ace.Odbc.LinqService).sql | 29 +++ ...ansaction(Access.Ace.Odbc.LinqService).sql | 29 +++ ...sionAsync(Access.Ace.Odbc.LinqService).sql | 25 ++ ...ast1Async(Access.Ace.Odbc.LinqService).sql | 11 + ...st18Async(Access.Ace.Odbc.LinqService).sql | 14 ++ ...ter1Async(Access.Ace.Odbc.LinqService).sql | 6 + ...e3132Test(Access.Ace.Odbc.LinqService).sql | 213 ++++++++++++++++++ ...ync(Access.Ace.Odbc.LinqService,False).sql | 13 ++ ...sync(Access.Ace.Odbc.LinqService,True).sql | 13 ++ ...ync(Access.Ace.Odbc.LinqService,False).sql | 13 ++ ...sync(Access.Ace.Odbc.LinqService,True).sql | 13 ++ ...kip1Async(Access.Ace.Odbc.LinqService).sql | 80 +------ ...ync(Access.Ace.Odbc.LinqService,False).sql | 18 ++ ...sync(Access.Ace.Odbc.LinqService,True).sql | 18 ++ ...ync(Access.Ace.Odbc.LinqService,False).sql | 9 + ...sync(Access.Ace.Odbc.LinqService,True).sql | 9 + ...ync(Access.Ace.Odbc.LinqService,False).sql | 11 + ...sync(Access.Ace.Odbc.LinqService,True).sql | 11 + ...ync(Access.Ace.Odbc.LinqService,False).sql | 11 + ...sync(Access.Ace.Odbc.LinqService,True).sql | 11 + ...ync(Access.Ace.Odbc.LinqService,False).sql | 9 + ...sync(Access.Ace.Odbc.LinqService,True).sql | 9 + ...ce.Odbc.LinqService,False,False,False).sql | 16 ++ ...Ace.Odbc.LinqService,False,False,True).sql | 16 ++ ...Ace.Odbc.LinqService,False,True,False).sql | 16 ++ ....Ace.Odbc.LinqService,False,True,True).sql | 16 ++ ...Ace.Odbc.LinqService,True,False,False).sql | 16 ++ ....Ace.Odbc.LinqService,True,False,True).sql | 16 ++ ....Ace.Odbc.LinqService,True,True,False).sql | 16 ++ ...s.Ace.Odbc.LinqService,True,True,True).sql | 16 ++ ...ble1Async(Access.Ace.Odbc.LinqService).sql | 34 +++ ...ableAsync(Access.Ace.Odbc.LinqService).sql | 30 +++ ...NameAsync(Access.Ace.Odbc.LinqService).sql | 88 ++++++++ ...ert2Async(Access.Ace.Odbc.LinqService).sql | 44 ++++ ...ert3Async(Access.Ace.Odbc.LinqService).sql | 46 ++++ ...ert4Async(Access.Ace.Odbc.LinqService).sql | 46 ++++ ...NameAsync(Access.Ace.Odbc.LinqService).sql | 69 ++++++ ...ace1Async(Access.Ace.Odbc.LinqService).sql | 73 ++++++ ...NameAsync(Access.Ace.Odbc.LinqService).sql | 129 +++++++++++ ...ate3Async(Access.Ace.Odbc.LinqService).sql | 71 ++++++ ...te3xAsync(Access.Ace.Odbc.LinqService).sql | 71 ++++++ ...ity1Async(Access.Ace.Odbc.LinqService).sql | 14 ++ ...ity2Async(Access.Ace.Odbc.LinqService).sql | 14 ++ ...ity4Async(Access.Ace.Odbc.LinqService).sql | 32 +++ ...te12Async(Access.Ace.Odbc.LinqService).sql | 11 + ...ate1Async(Access.Ace.Odbc.LinqService).sql | 54 +++++ ...ate2Async(Access.Ace.Odbc.LinqService).sql | 54 +++++ ...ate4Async(Access.Ace.Odbc.LinqService).sql | 53 +++++ ...ion1Async(Access.Ace.Odbc.LinqService).sql | 39 ++++ ...1AsyncOld(Access.Ace.Odbc.LinqService).sql | 39 ++++ ...NameAsync(Access.Ace.Odbc.LinqService).sql | 105 +++++++++ ...lex1Async(Access.Ace.Odbc.LinqService).sql | 55 +++++ ....Linq.AsyncTests.Test(Access.Ace.Odbc).sql | 18 ++ ...Linq.AsyncTests.Test1(Access.Ace.Odbc).sql | 9 + ...syncTests.TestForEach(Access.Ace.Odbc).sql | 9 + ...ll4Async(Access.Ace.OleDb.LinqService).sql | 10 + ...By2Async(Access.Ace.OleDb.LinqService).sql | 31 +++ ...ble1Test(Access.Ace.OleDb.LinqService).sql | 9 + ...ble2Test(Access.Ace.OleDb.LinqService).sql | 11 + ...ast1Test(Access.Ace.OleDb.LinqService).sql | 9 + ...ast2Test(Access.Ace.OleDb.LinqService).sql | 11 + ...syncTest(Access.Ace.OleDb.LinqService).sql | 12 + ...syncTest(Access.Ace.OleDb.LinqService).sql | 14 ++ ...SkipTest(Access.Ace.OleDb.LinqService).sql | 11 + ...rDefault(Access.Ace.OleDb.LinqService).sql | 19 ++ ...syncTest(Access.Ace.OleDb.LinqService).sql | 21 ++ ...syncTest(Access.Ace.OleDb.LinqService).sql | 21 ++ ...estAsync(Access.Ace.OleDb.LinqService).sql | 24 ++ ...stAsync2(Access.Ace.OleDb.LinqService).sql | 24 ++ ...yncdTest(Access.Ace.OleDb.LinqService).sql | 15 ++ ...st3Async(Access.Ace.OleDb.LinqService).sql | 26 +++ ...estAsync(Access.Ace.OleDb.LinqService).sql | 24 ++ ...estAsync(Access.Ace.OleDb.LinqService).sql | 24 ++ ...stAsync2(Access.Ace.OleDb.LinqService).sql | 24 ++ ...stAsync1(Access.Ace.OleDb.LinqService).sql | 26 +++ ...stAsync2(Access.Ace.OleDb.LinqService).sql | 26 +++ ...estAsync(Access.Ace.OleDb.LinqService).sql | 24 ++ ...stAsync2(Access.Ace.OleDb.LinqService).sql | 24 ++ ...ateAsync(Access.Ace.OleDb.LinqService).sql | 168 +------------- ...ateAsync(Access.Ace.OleDb.LinqService).sql | 168 +------------- ...ateAsync(Access.Ace.OleDb.LinqService).sql | 171 ++------------ ...ateAsync(Access.Ace.OleDb.LinqService).sql | 171 ++------------ ...ateAsync(Access.Ace.OleDb.LinqService).sql | 168 +------------- ...torAsync(Access.Ace.OleDb.LinqService).sql | 168 +------------- ...torAsync(Access.Ace.OleDb.LinqService).sql | 168 +------------- ...ateAsync(Access.Ace.OleDb.LinqService).sql | 171 ++------------ ...ateAsync(Access.Ace.OleDb.LinqService).sql | 171 ++------------ ...at1Async(Access.Ace.OleDb.LinqService).sql | 19 ++ ...entAsync(Access.Ace.OleDb.LinqService).sql | 97 ++++++++ ...redAsync(Access.Ace.OleDb.LinqService).sql | 80 +++++++ ...nt1Async(Access.Ace.OleDb.LinqService).sql | 8 + ...nt2Async(Access.Ace.OleDb.LinqService).sql | 10 + ...ax1Async(Access.Ace.OleDb.LinqService).sql | 16 ++ ...ssue4602(Access.Ace.OleDb.LinqService).sql | 48 +--- ...57_Async(Access.Ace.OleDb.LinqService).sql | 29 +++ ...nsaction(Access.Ace.OleDb.LinqService).sql | 29 +++ ...ionAsync(Access.Ace.OleDb.LinqService).sql | 25 ++ ...st1Async(Access.Ace.OleDb.LinqService).sql | 11 + ...t18Async(Access.Ace.OleDb.LinqService).sql | 14 ++ ...er1Async(Access.Ace.OleDb.LinqService).sql | 6 + ...3132Test(Access.Ace.OleDb.LinqService).sql | 213 ++++++++++++++++++ ...nc(Access.Ace.OleDb.LinqService,False).sql | 13 ++ ...ync(Access.Ace.OleDb.LinqService,True).sql | 13 ++ ...nc(Access.Ace.OleDb.LinqService,False).sql | 13 ++ ...ync(Access.Ace.OleDb.LinqService,True).sql | 13 ++ ...ip1Async(Access.Ace.OleDb.LinqService).sql | 80 +------ ...nc(Access.Ace.OleDb.LinqService,False).sql | 18 ++ ...ync(Access.Ace.OleDb.LinqService,True).sql | 18 ++ ...nc(Access.Ace.OleDb.LinqService,False).sql | 9 + ...ync(Access.Ace.OleDb.LinqService,True).sql | 9 + ...nc(Access.Ace.OleDb.LinqService,False).sql | 11 + ...ync(Access.Ace.OleDb.LinqService,True).sql | 11 + ...nc(Access.Ace.OleDb.LinqService,False).sql | 11 + ...ync(Access.Ace.OleDb.LinqService,True).sql | 11 + ...nc(Access.Ace.OleDb.LinqService,False).sql | 9 + ...ync(Access.Ace.OleDb.LinqService,True).sql | 9 + ...e.OleDb.LinqService,False,False,False).sql | 16 ++ ...ce.OleDb.LinqService,False,False,True).sql | 16 ++ ...ce.OleDb.LinqService,False,True,False).sql | 16 ++ ...Ace.OleDb.LinqService,False,True,True).sql | 16 ++ ...ce.OleDb.LinqService,True,False,False).sql | 16 ++ ...Ace.OleDb.LinqService,True,False,True).sql | 16 ++ ...Ace.OleDb.LinqService,True,True,False).sql | 16 ++ ....Ace.OleDb.LinqService,True,True,True).sql | 16 ++ ...le1Async(Access.Ace.OleDb.LinqService).sql | 34 +++ ...bleAsync(Access.Ace.OleDb.LinqService).sql | 30 +++ ...ameAsync(Access.Ace.OleDb.LinqService).sql | 88 ++++++++ ...rt2Async(Access.Ace.OleDb.LinqService).sql | 44 ++++ ...rt3Async(Access.Ace.OleDb.LinqService).sql | 46 ++++ ...rt4Async(Access.Ace.OleDb.LinqService).sql | 46 ++++ ...ameAsync(Access.Ace.OleDb.LinqService).sql | 69 ++++++ ...ce1Async(Access.Ace.OleDb.LinqService).sql | 73 ++++++ ...ameAsync(Access.Ace.OleDb.LinqService).sql | 129 +++++++++++ ...te3Async(Access.Ace.OleDb.LinqService).sql | 71 ++++++ ...e3xAsync(Access.Ace.OleDb.LinqService).sql | 71 ++++++ ...ty1Async(Access.Ace.OleDb.LinqService).sql | 14 ++ ...ty2Async(Access.Ace.OleDb.LinqService).sql | 14 ++ ...ty4Async(Access.Ace.OleDb.LinqService).sql | 32 +++ ...e12Async(Access.Ace.OleDb.LinqService).sql | 11 + ...te1Async(Access.Ace.OleDb.LinqService).sql | 54 +++++ ...te2Async(Access.Ace.OleDb.LinqService).sql | 54 +++++ ...te4Async(Access.Ace.OleDb.LinqService).sql | 53 +++++ ...on1Async(Access.Ace.OleDb.LinqService).sql | 39 ++++ ...AsyncOld(Access.Ace.OleDb.LinqService).sql | 39 ++++ ...ameAsync(Access.Ace.OleDb.LinqService).sql | 105 +++++++++ ...ex1Async(Access.Ace.OleDb.LinqService).sql | 55 +++++ ...Linq.AsyncTests.Test(Access.Ace.OleDb).sql | 18 ++ ...inq.AsyncTests.Test1(Access.Ace.OleDb).sql | 9 + ...yncTests.TestForEach(Access.Ace.OleDb).sql | 9 + 188 files changed, 5238 insertions(+), 3066 deletions(-) create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.Odbc.LinqService,False).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.Odbc.LinqService,True).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.Odbc.LinqService,False).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.Odbc.LinqService,True).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.Odbc.LinqService,False).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.Odbc.LinqService,True).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.Odbc.LinqService,False).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.Odbc.LinqService,True).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.Odbc.LinqService,False).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.Odbc.LinqService,True).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.Odbc.LinqService,False).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.Odbc.LinqService,True).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Ace.Odbc.LinqService).sql create mode 100644 Access.Ace.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Ace.Odbc).sql create mode 100644 Access.Ace.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Ace.Odbc).sql create mode 100644 Access.Ace.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Ace.Odbc).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.OleDb.LinqService,False).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.OleDb.LinqService,True).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.OleDb.LinqService,False).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.OleDb.LinqService,True).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.OleDb.LinqService,False).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.OleDb.LinqService,True).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.OleDb.LinqService,False).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.OleDb.LinqService,True).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.OleDb.LinqService,False).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.OleDb.LinqService,True).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.OleDb.LinqService,False).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.OleDb.LinqService,True).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Ace.OleDb.LinqService).sql create mode 100644 Access.Ace.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Ace.OleDb).sql create mode 100644 Access.Ace.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Ace.OleDb).sql create mode 100644 Access.Ace.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Ace.OleDb).sql diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..6ef58ee561bc --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) = 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] <= 3 + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..5f2e68623bd5 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,31 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON ([t1].[ParentID] = [a_Parent1].[ParentID]) + ) [m_1], + [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON ([d].[ParentID] = [a_Parent1_1].[ParentID]) +WHERE + [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON ([t1].[ParentID] = [a_Parent1].[ParentID]) +GROUP BY + [a_Parent1].[ParentID] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..63d317e6cc22 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..823664f58617 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..63d317e6cc22 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..823664f58617 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..bc9539a30f7d --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +SELECT + COUNT(*) > 0 +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..516f4515fe2b --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 1 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Ace.Odbc.LinqService).sql index 786b363cae89..32622ae3e7fa 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Ace.Odbc.LinqService).sql @@ -9,3 +9,14 @@ FROM ORDER BY [t1].[ParentID] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..5f4e002d5038 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 +DECLARE @p Int -- Int32 +SET @p = 2 +DECLARE @p Int -- Int32 +SET @p = 3 +DECLARE @param Int -- Int32 +SET @param = 4 + +SELECT TOP 1 + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (?, ?, ?) OR [o].[ParentID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..4cbd9f91e5fc --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..4cbd9f91e5fc --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..7c39120fa1b1 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..7c39120fa1b1 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..94095793c835 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = ? +ORDER BY + [x].[ParentID] DESC + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..c11ec24c2f60 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 2 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..7c39120fa1b1 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..09aa8f2b99a6 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..09aa8f2b99a6 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..fc1863bc0062 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..fc1863bc0062 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..eaa0cda856a9 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..eaa0cda856a9 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Ace.Odbc.LinqService).sql index dacd88a4e68b..ce58872cc620 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Ace.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) > 0 +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = ? diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Ace.Odbc.LinqService).sql index dacd88a4e68b..9d7f08d35482 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Ace.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = ? diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Ace.Odbc.LinqService).sql index dacd88a4e68b..f3d6dcba4541 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Ace.Odbc.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 1 + CVar(?), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(?) diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Ace.Odbc.LinqService).sql index dacd88a4e68b..f3d6dcba4541 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Ace.Odbc.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 1 + CVar(?), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(?) diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Ace.Odbc.LinqService).sql index dacd88a4e68b..9d7f08d35482 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Ace.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = ? diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Ace.Odbc.LinqService).sql index dacd88a4e68b..84e87012d5c4 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Ace.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > ? diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Ace.Odbc.LinqService).sql index dacd88a4e68b..a40870bf54d6 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Ace.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > ? diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Ace.Odbc.LinqService).sql index dacd88a4e68b..bf6f3536031d 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Ace.Odbc.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 2 + CVar(?), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(?) diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Ace.Odbc.LinqService).sql index dacd88a4e68b..bf6f3536031d 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Ace.Odbc.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Id Int -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [AsyncDataTable] +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 2 +DECLARE @p Int -- Int32 +SET @p = 2 + +SELECT TOP 2 + CVar(?), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(?) diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..e7797615e7e5 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Ace.Odbc.LinqService).sql index e8eeed5ec92e..fc22cfbbf24f 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Ace.Odbc.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + ?, + ?, + ? +) + +BeforeExecute -- Access.Ace.Odbc AccessODBC SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] [obj] +SET + [obj].[Stamp] = [obj].[Stamp] + 1, + [obj].[Value] = ? +WHERE + [obj].[Id] = ? AND [obj].[Stamp] = ? + BeforeExecute -- Access.Ace.Odbc AccessODBC @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] [obj] +SET + [obj].[Stamp] = [obj].[Stamp] + 1, + [obj].[Value] = ? +WHERE + [obj].[Id] = ? AND [obj].[Stamp] = ? + BeforeExecute -- Access.Ace.Odbc AccessODBC @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] [obj] +SET + [obj].[Stamp] = [obj].[Stamp] + 1, + [obj].[Value] = ? +WHERE + [obj].[Id] = ? AND [obj].[Stamp] = ? + BeforeExecute -- Access.Ace.Odbc AccessODBC @@ -38,6 +111,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = ? AND [obj].[Stamp] = ? + BeforeExecute -- Access.Ace.Odbc AccessODBC @@ -48,6 +133,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -8 + +DELETE FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = ? AND [obj].[Stamp] = ? + BeforeExecute -- Access.Ace.Odbc AccessODBC diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Ace.Odbc.LinqService).sql index 7d2e259a03b7..989752d709a3 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Ace.Odbc.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + ?, + ?, + ? +) + +BeforeExecute -- Access.Ace.Odbc AccessODBC SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] [r] +SET + [r].[Stamp] = [r].[Stamp] + 1, + [r].[Value] = ? +WHERE + [r].[Id] = 2 AND [r].[Id] = ? AND [r].[Stamp] = ? + BeforeExecute -- Access.Ace.Odbc AccessODBC @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] [r] +SET + [r].[Stamp] = [r].[Stamp] + 1, + [r].[Value] = ? +WHERE + [r].[Id] = 1 AND [r].[Id] = ? AND [r].[Stamp] = ? + BeforeExecute -- Access.Ace.Odbc AccessODBC @@ -28,6 +84,18 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = ? AND [r].[Stamp] = ? + BeforeExecute -- Access.Ace.Odbc AccessODBC @@ -38,6 +106,18 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Id Int -- Int32 +SET @Id = 1 +DECLARE @Stamp Int -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = ? AND [r].[Stamp] = ? + BeforeExecute -- Access.Ace.Odbc AccessODBC diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..d1423f3c2a91 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..1c20e52efdfb --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..060c533382a5 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON ([c_1].[ParentID] = [a_Parent].[ParentID]) + WHERE + [a_Parent].[ParentID] = [t1].[ParentID] + )) +FROM + [Parent] [t1] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Ace.Odbc.LinqService).sql index b73cb3561893..fcf07e9a54a9 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Ace.Odbc.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [DynamicParent] - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -CREATE TABLE [DynamicParent] -( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [DynamicChild] - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -CREATE TABLE [DynamicChild] -( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [DynamicChild] - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [DynamicParent] +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON ([it].[ID] = [a_Child].[ParentID]) +WHERE + [a_Child].[ID] = 123 diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Ace.Odbc.LinqService).sql index 58d1f86910ca..248f07a503b2 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Ace.Odbc.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP 1 + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON ([m_1].[ParentID] = [d].[ParentID]) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(Unspecified) BeforeExecute -- Access.Ace.Odbc AccessODBC (asynchronously) diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Ace.Odbc.LinqService).sql index bd87b996d392..a29213bacc2e 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Ace.Odbc.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP 1 + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON ([m_1].[ParentID] = [d].[ParentID]) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- Access.Ace.Odbc AccessODBC (asynchronously) diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..e2efac2994a7 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON ([a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID]) + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..1baa9ed16cf8 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..45fa2cce4338 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = 'F' + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..df220f423dea --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + 1 + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..71264c2ccc1d --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.Odbc.LinqService,False).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..0df8c10fe26b --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.Odbc.LinqService,False).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.Odbc.LinqService,True).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..0df8c10fe26b --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.Odbc.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.Odbc.LinqService,False).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..0df8c10fe26b --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.Odbc.LinqService,False).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.Odbc.LinqService,True).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..0df8c10fe26b --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.Odbc.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Ace.Odbc.LinqService).sql index beeef65ea298..9869ad430801 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Ace.Odbc.LinqService).sql @@ -1,74 +1,10 @@ BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [TakeSkipClass] - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -CREATE TABLE [TakeSkipClass] -( - [Value] VarChar(10) NULL -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - ? -) - -BeforeExecute --- Access.Ace.Odbc AccessODBC - -DROP TABLE [TakeSkipClass] +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.Odbc.LinqService,False).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.Odbc.LinqService,False).sql index 72441be62d2c..1c2241602f5d 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.Odbc.LinqService,False).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.Odbc.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP 3 FROM [Child] [ch] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.Odbc.LinqService,True).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.Odbc.LinqService,True).sql index 72441be62d2c..1c2241602f5d 100644 --- a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.Odbc.LinqService,True).sql +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.Odbc.LinqService,True).sql @@ -16,3 +16,21 @@ SELECT TOP 3 FROM [Child] [ch] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.Odbc.LinqService,False).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..c97b4c9b0a5e --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.Odbc.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 1 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.Odbc.LinqService,True).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..c97b4c9b0a5e --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.Odbc.LinqService,True).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 1 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.Odbc.LinqService,False).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..c25b3dc9bfc6 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.Odbc.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.Odbc.LinqService,True).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..c25b3dc9bfc6 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.Odbc.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.Odbc.LinqService,False).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..2d3c19f63622 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.Odbc.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.Odbc.LinqService,True).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..2d3c19f63622 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.Odbc.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.Odbc.LinqService,False).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..f14b69eaa3fa --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.Odbc.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.Odbc.LinqService,True).sql b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..f14b69eaa3fa --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.Odbc.LinqService,True).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,False,False).sql b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,False,False).sql index bf9981f05c82..b7e289e8e84d 100644 --- a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,False,False).sql +++ b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,False,True).sql b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,False,True).sql index bf9981f05c82..b7e289e8e84d 100644 --- a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,False,True).sql +++ b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,True,False).sql b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,True,False).sql index bf9981f05c82..599c3bdfffd3 100644 --- a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,True,False).sql +++ b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Database\TestData.ODBC.mdb].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,True,True).sql b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,True,True).sql index bf9981f05c82..599c3bdfffd3 100644 --- a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,True,True).sql +++ b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,False,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Database\TestData.ODBC.mdb].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,False,False).sql b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,False,False).sql index bf9981f05c82..b7e289e8e84d 100644 --- a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,False,False).sql +++ b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,False,True).sql b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,False,True).sql index bf9981f05c82..b7e289e8e84d 100644 --- a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,False,True).sql +++ b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,True,False).sql b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,True,False).sql index bf9981f05c82..599c3bdfffd3 100644 --- a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,True,False).sql +++ b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Database\TestData.ODBC.mdb].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,True,True).sql b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,True,True).sql index bf9981f05c82..599c3bdfffd3 100644 --- a/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,True,True).sql +++ b/Access.Ace.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.Odbc.LinqService,True,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [Database\TestData.ODBC.mdb].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..94f49d70e15b --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [TestTable] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(255) NULL, + [CreatedOn] DateTime NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [TestTable] + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Ace.Odbc.LinqService).sql index c54c64d96d27..8fb2e6064712 100644 --- a/Access.Ace.Odbc.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Ace.Odbc.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [TempTable] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [TempTable] +( + [ID] Int NOT NULL +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- Access.Ace.Odbc AccessODBC SELECT @@ -7,3 +32,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON ([p].[ParentID] = [t].[ID]) +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [TempTable] + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..bad75cae29ac --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,88 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + ?, + ?, + ?, + ? +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @ID Int -- Int32 +SET @ID = 1 + +DELETE FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..9fd297b03e32 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + ? +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..f117c433d663 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + ? +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..f117c433d663 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + ? +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Ace.Odbc.LinqService).sql index 5f88af739f79..8a4ff0814cfa 100644 --- a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Ace.Odbc.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + ?, + ?, + ?, + ? +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) DECLARE @FirstName NVarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName NVarChar(4) -- String @@ -60,3 +100,32 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = 'Steven' AND [p].[LastName] = 'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Ace.Odbc.LinqService).sql index 91c8cd6ca419..39ff5ce6e729 100644 --- a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Ace.Odbc.LinqService).sql @@ -54,3 +54,76 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc0' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..87a478d4b194 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,129 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPatient] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(255) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO [xxPatient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO [xxPatient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Int -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPatient] + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Ace.Odbc.LinqService).sql index 91c8cd6ca419..6a831514b898 100644 --- a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Ace.Odbc.LinqService).sql @@ -54,3 +54,74 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + ?), NULL) +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + ?, + 'abc' +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + ?), NULL) +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id Int -- Int32 +SET @id = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + ?), NULL) +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Ace.Odbc.LinqService).sql index 91c8cd6ca419..fb55fde19442 100644 --- a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Ace.Odbc.LinqService).sql @@ -54,3 +54,74 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 0 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + ?), NULL) +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + ?, + 'abc' +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 1 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + ?), NULL) +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @i Int -- Int32 +SET @i = 2 +DECLARE @id2 Int -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + ?), NULL) +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Ace.Odbc.LinqService).sql index 53d42e569854..267ed931df1b 100644 --- a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Ace.Odbc.LinqService).sql @@ -27,6 +27,20 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Ace.Odbc AccessODBC diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Ace.Odbc.LinqService).sql index 53d42e569854..267ed931df1b 100644 --- a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Ace.Odbc.LinqService).sql @@ -27,6 +27,20 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Ace.Odbc AccessODBC diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Ace.Odbc.LinqService).sql index 8f3c0744996d..98d96edeaa5a 100644 --- a/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Ace.Odbc.LinqService).sql @@ -37,6 +37,22 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John0' + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = ? AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Ace.Odbc AccessODBC (asynchronously) DECLARE @FirstName NVarChar(5) -- String @@ -68,6 +84,22 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John1' + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = ? AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Ace.Odbc AccessODBC diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..e442e161c51a --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +UPDATE + [Parent] [p1] + INNER JOIN [Parent] [p2] ON ([p1].[ParentID] = [p2].[ParentID]) +SET + [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..3b5e44a70ab2 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] [p] +SET + [p].[ParentID] = [p].[ParentID] + 1 +WHERE + [p].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..3b5e44a70ab2 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @ParentID Int -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] [p] +SET + [p].[ParentID] = [p].[ParentID] + 1 +WHERE + [p].[ParentID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..cf43abd9129f --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,53 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + ? +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 1001 + +UPDATE + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON ([c_1].[ParentID] = [a_Parent].[ParentID]) +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +WHERE + [c_1].[ChildID] = ? AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @p Int -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = ? + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..caba00f49ac3 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +UPDATE + [Parent] [a_Parent], + [Child] [child_1] +SET + [a_Parent].[Value1] = 5 +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [a_Parent].[ParentID] + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..caba00f49ac3 --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +UPDATE + [Parent] [a_Parent], + [Child] [child_1] +SET + [a_Parent].[Value1] = 5 +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [a_Parent].[ParentID] + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Ace.Odbc.LinqService).sql new file mode 100644 index 000000000000..be9f93e078af --- /dev/null +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Ace.Odbc.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + ?, + ?, + ?, + ? +) + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Int -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] [t1] +SET + [t1].[FirstName] = ?, + [t1].[LastName] = ?, + [t1].[MiddleName] = ?, + [t1].[Gender] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Ace.Odbc.LinqService).sql b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Ace.Odbc.LinqService).sql index e1402f2e0dec..8ffd73ddaec7 100644 --- a/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Ace.Odbc.LinqService).sql +++ b/Access.Ace.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Ace.Odbc.LinqService).sql @@ -54,3 +54,58 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP 1 + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName NVarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName NVarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int -- Int32 +SET @ID = 5 + +UPDATE + [Person] [t1] +SET + [t1].[Gender] = ?, + [t1].[FirstName] = ?, + [t1].[MiddleName] = ?, + [t1].[LastName] = ? +WHERE + [t1].[PersonID] = ? + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) +DECLARE @id Int -- Int32 +SET @id = 5 + +SELECT TOP 1 + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = ? + diff --git a/Access.Ace.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Ace.Odbc).sql b/Access.Ace.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Ace.Odbc).sql new file mode 100644 index 000000000000..7e9f86807ae8 --- /dev/null +++ b/Access.Ace.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Ace.Odbc).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Ace.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Ace.Odbc).sql b/Access.Ace.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Ace.Odbc).sql new file mode 100644 index 000000000000..63d317e6cc22 --- /dev/null +++ b/Access.Ace.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Ace.Odbc).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Ace.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Ace.Odbc).sql b/Access.Ace.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Ace.Odbc).sql new file mode 100644 index 000000000000..63d317e6cc22 --- /dev/null +++ b/Access.Ace.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Ace.Odbc).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.Odbc AccessODBC (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..c03447e6d447 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) = 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] <= 3 + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..d16e846ad94b --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,31 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON ([t1].[ParentID] = [a_Parent1].[ParentID]) + ) [m_1], + [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON ([d].[ParentID] = [a_Parent1_1].[ParentID]) +WHERE + [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON ([t1].[ParentID] = [a_Parent1].[ParentID]) +GROUP BY + [a_Parent1].[ParentID] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..acdfb6f52e25 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..b24ff2c610d5 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..acdfb6f52e25 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..b24ff2c610d5 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..44d089c9f434 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +SELECT + COUNT(*) > 0 +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @ID + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..63d19659e5aa --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 1 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Ace.OleDb.LinqService).sql index f430f4c0a92c..5bb442374a31 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Access.Ace.OleDb.LinqService).sql @@ -9,3 +9,14 @@ FROM ORDER BY [t1].[ParentID] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..ad32e480127e --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer -- Int32 +SET @p_2 = 3 +DECLARE @param Integer -- Int32 +SET @param = 4 + +SELECT TOP 1 + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..087a495b4753 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..087a495b4753 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..219ef86d1c31 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..219ef86d1c31 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..994fec600e97 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..4ef741530ae2 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT TOP 2 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..219ef86d1c31 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) > 0 +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..10e72176ab00 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..10e72176ab00 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..4b11d36855c4 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..4b11d36855c4 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..e03525b9ac62 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..e03525b9ac62 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Ace.OleDb.LinqService).sql index c6c238abaabd..a9b71d0134ff 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Access.Ace.OleDb.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) > 0 +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Ace.OleDb.LinqService).sql index c6c238abaabd..caf864e29fff 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Access.Ace.OleDb.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Ace.OleDb.LinqService).sql index c6c238abaabd..39ec40374cbe 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Access.Ace.OleDb.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 + +SELECT TOP 1 + CVar(@p), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(@p_1) diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Ace.OleDb.LinqService).sql index c6c238abaabd..39ec40374cbe 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Access.Ace.OleDb.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 + +SELECT TOP 1 + CVar(@p), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(@p_1) diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Ace.OleDb.LinqService).sql index c6c238abaabd..caf864e29fff 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Access.Ace.OleDb.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Ace.OleDb.LinqService).sql index c6c238abaabd..b6496e927073 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Access.Ace.OleDb.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Ace.OleDb.LinqService).sql index c6c238abaabd..7a43be20cdd9 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Access.Ace.OleDb.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Ace.OleDb.LinqService).sql index c6c238abaabd..ee9b301b4ffb 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Access.Ace.OleDb.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 + +SELECT TOP 2 + CVar(@p), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(@p_1) diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Ace.OleDb.LinqService).sql index c6c238abaabd..ee9b301b4ffb 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Access.Ace.OleDb.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -CREATE TABLE [AsyncDataTable] -( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [AsyncDataTable] +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 + +SELECT TOP 2 + CVar(@p), + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = CVar(@p_1) diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..902fbe824f90 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Ace.OleDb.LinqService).sql index 737a1e99c137..c20f51258ecc 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Access.Ace.OleDb.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value VarWChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Access.Ace.OleDb AccessOleDb SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Value VarWChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] [obj] +SET + [obj].[Stamp] = [obj].[Stamp] + 1, + [obj].[Value] = @Value +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- Access.Ace.OleDb AccessOleDb @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Value VarWChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] [obj] +SET + [obj].[Stamp] = [obj].[Stamp] + 1, + [obj].[Value] = @Value +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- Access.Ace.OleDb AccessOleDb @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Value VarWChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] [obj] +SET + [obj].[Stamp] = [obj].[Stamp] + 1, + [obj].[Value] = @Value +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- Access.Ace.OleDb AccessOleDb @@ -38,6 +111,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- Access.Ace.OleDb AccessOleDb @@ -48,6 +133,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -8 + +DELETE FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- Access.Ace.OleDb AccessOleDb diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Ace.OleDb.LinqService).sql index 4c93bddd1fcc..2ec5ac66e1ee 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Access.Ace.OleDb.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value VarWChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Access.Ace.OleDb AccessOleDb SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Value VarWChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] [r] +SET + [r].[Stamp] = [r].[Stamp] + 1, + [r].[Value] = @Value +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- Access.Ace.OleDb AccessOleDb @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Value VarWChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] [r] +SET + [r].[Stamp] = [r].[Stamp] + 1, + [r].[Value] = @Value +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- Access.Ace.OleDb AccessOleDb @@ -28,6 +84,18 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- Access.Ace.OleDb AccessOleDb @@ -38,6 +106,18 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- Access.Ace.OleDb AccessOleDb diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..2b72509a2ffb --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..18c8c3522044 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..a921de11c60e --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON ([c_1].[ParentID] = [a_Parent].[ParentID]) + WHERE + [a_Parent].[ParentID] = [t1].[ParentID] + )) +FROM + [Parent] [t1] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Ace.OleDb.LinqService).sql index 2730370f74a6..38dd8f09645a 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Access.Ace.OleDb.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [DynamicParent] - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -CREATE TABLE [DynamicParent] -( - [ID] Int NOT NULL IDENTITY, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [DynamicChild] - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -CREATE TABLE [DynamicChild] -( - [ID] Int NOT NULL IDENTITY, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [DynamicChild] - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [DynamicParent] +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON ([it].[ID] = [a_Child].[ParentID]) +WHERE + [a_Child].[ID] = 123 diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Ace.OleDb.LinqService).sql index 7e200c411553..ab42f7a3e612 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Access.Ace.OleDb.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP 1 + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON ([m_1].[ParentID] = [d].[ParentID]) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(Unspecified) BeforeExecute -- Access.Ace.OleDb AccessOleDb (asynchronously) diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Ace.OleDb.LinqService).sql index c8b729cf2b12..b6c77ce52a09 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Access.Ace.OleDb.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP 1 + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON ([m_1].[ParentID] = [d].[ParentID]) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- Access.Ace.OleDb AccessOleDb (asynchronously) diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..1f60397d2ea7 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON ([a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID]) + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..8b0451755647 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..54d987eb53bf --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = 'F' + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..a7e4e1088385 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + 1 + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..9b0a96af1577 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.OleDb.LinqService,False).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.OleDb.LinqService,False).sql new file mode 100644 index 000000000000..504374da06e6 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.OleDb.LinqService,False).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.OleDb.LinqService,True).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.OleDb.LinqService,True).sql new file mode 100644 index 000000000000..504374da06e6 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Access.Ace.OleDb.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.OleDb.LinqService,False).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.OleDb.LinqService,False).sql new file mode 100644 index 000000000000..504374da06e6 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.OleDb.LinqService,False).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.OleDb.LinqService,True).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.OleDb.LinqService,True).sql new file mode 100644 index 000000000000..504374da06e6 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Access.Ace.OleDb.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Ace.OleDb.LinqService).sql index c6f23dc643b7..52786f5085b7 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Access.Ace.OleDb.LinqService).sql @@ -1,74 +1,10 @@ BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [TakeSkipClass] - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -CREATE TABLE [TakeSkipClass] -( - [Value] VarChar(10) NULL -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- Access.Ace.OleDb AccessOleDb - -DROP TABLE [TakeSkipClass] +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.OleDb.LinqService,False).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.OleDb.LinqService,False).sql index deaa64ef9bf4..a5b75f3340fc 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.OleDb.LinqService,False).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.OleDb.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP 3 FROM [Child] [ch] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.OleDb.LinqService,True).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.OleDb.LinqService,True).sql index deaa64ef9bf4..a5b75f3340fc 100644 --- a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.OleDb.LinqService,True).sql +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Access.Ace.OleDb.LinqService,True).sql @@ -16,3 +16,21 @@ SELECT TOP 3 FROM [Child] [ch] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.OleDb.LinqService,False).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.OleDb.LinqService,False).sql new file mode 100644 index 000000000000..84465869d699 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.OleDb.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 1 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.OleDb.LinqService,True).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.OleDb.LinqService,True).sql new file mode 100644 index 000000000000..84465869d699 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Access.Ace.OleDb.LinqService,True).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 1 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.OleDb.LinqService,False).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.OleDb.LinqService,False).sql new file mode 100644 index 000000000000..e1f12ce78c0c --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.OleDb.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.OleDb.LinqService,True).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.OleDb.LinqService,True).sql new file mode 100644 index 000000000000..e1f12ce78c0c --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Access.Ace.OleDb.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.OleDb.LinqService,False).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.OleDb.LinqService,False).sql new file mode 100644 index 000000000000..b87bb05db217 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.OleDb.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.OleDb.LinqService,True).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.OleDb.LinqService,True).sql new file mode 100644 index 000000000000..b87bb05db217 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Access.Ace.OleDb.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.OleDb.LinqService,False).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.OleDb.LinqService,False).sql new file mode 100644 index 000000000000..8932ab7ebc5e --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.OleDb.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.OleDb.LinqService,True).sql b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.OleDb.LinqService,True).sql new file mode 100644 index 000000000000..8932ab7ebc5e --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Access.Ace.OleDb.LinqService,True).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,False,False).sql b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,False,False).sql index 34bc350e6e31..e6df2ffd0592 100644 --- a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,False,False).sql +++ b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,False,True).sql b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,False,True).sql index 34bc350e6e31..e6df2ffd0592 100644 --- a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,False,True).sql +++ b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,True,False).sql b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,True,False).sql index 34bc350e6e31..ae7ab827b29a 100644 --- a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,True,False).sql +++ b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Database\TestData].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,True,True).sql b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,True,True).sql index 34bc350e6e31..ae7ab827b29a 100644 --- a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,True,True).sql +++ b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,False,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Database\TestData].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,False,False).sql b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,False,False).sql index 34bc350e6e31..e6df2ffd0592 100644 --- a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,False,False).sql +++ b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,False,True).sql b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,False,True).sql index 34bc350e6e31..e6df2ffd0592 100644 --- a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,False,True).sql +++ b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,True,False).sql b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,True,False).sql index 34bc350e6e31..ae7ab827b29a 100644 --- a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,True,False).sql +++ b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Database\TestData].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,True,True).sql b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,True,True).sql index 34bc350e6e31..ae7ab827b29a 100644 --- a/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,True,True).sql +++ b/Access.Ace.OleDb.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Access.Ace.OleDb.LinqService,True,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE [Issue681Table2] +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [Database\TestData].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [Issue681Table2] + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..fcc395899d45 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [TestTable] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int NOT NULL IDENTITY, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(255) NULL, + [CreatedOn] DateTime NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [TestTable] + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Ace.OleDb.LinqService).sql index 1ac51be46c15..30a599ff11db 100644 --- a/Access.Ace.OleDb.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Access.Ace.OleDb.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [TempTable] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [TempTable] +( + [ID] Int NOT NULL +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- Access.Ace.OleDb AccessOleDb SELECT @@ -7,3 +32,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON ([p].[ParentID] = [t].[ID]) +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [TempTable] + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..aa566dfd4bf9 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,88 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @FirstName VarWChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarWChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarWChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +DELETE FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..4ddf37f14b77 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..046f1a052696 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..046f1a052696 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DELETE FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Ace.OleDb.LinqService).sql index 678922ce08ad..3d3551044486 100644 --- a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Access.Ace.OleDb.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @FirstName VarWChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarWChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarWChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) DECLARE @FirstName VarWChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName VarWChar(4) -- String @@ -60,3 +100,32 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = 'Steven' AND [p].[LastName] = 'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Ace.OleDb.LinqService).sql index 53eef7af2d31..40175074da8c 100644 --- a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Access.Ace.OleDb.LinqService).sql @@ -54,3 +54,76 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'abc0' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'abc1' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'abc2' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..0b0fd81ae745 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,129 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPatient] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(255) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO [xxPatient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO [xxPatient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Diagnosis VarWChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 + +UPDATE + [xxPatient] [t1] +SET + [t1].[Diagnosis] = @Diagnosis +WHERE + [t1].[PersonID] = @PersonID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPatient] + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Ace.OleDb.LinqService).sql index 53eef7af2d31..addc9a620e6b 100644 --- a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Access.Ace.OleDb.LinqService).sql @@ -54,3 +54,74 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 0 +DECLARE @id Integer -- Int32 +SET @id = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + @i), NULL) +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 1 +DECLARE @id Integer -- Int32 +SET @id = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + @i), NULL) +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 2 +DECLARE @id Integer -- Int32 +SET @id = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + @i), NULL) +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Ace.OleDb.LinqService).sql index 53eef7af2d31..5dad29a97118 100644 --- a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Access.Ace.OleDb.LinqService).sql @@ -54,3 +54,74 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 0 +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + @i), NULL) +WHERE + [t1].[PersonID] = @id2 + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +INSERT INTO [Patient] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 1 +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + @i), NULL) +WHERE + [t1].[PersonID] = @id2 + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 2 +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 + +UPDATE + [Patient] [t1] +SET + [t1].[Diagnosis] = IIF([t1].[Diagnosis] IS NOT NULL, CStr(Len([t1].[Diagnosis]) + @i), NULL) +WHERE + [t1].[PersonID] = @id2 + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Ace.OleDb.LinqService).sql index 219a5dc9e08a..2964afb11c46 100644 --- a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Access.Ace.OleDb.LinqService).sql @@ -27,6 +27,20 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Ace.OleDb AccessOleDb diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Ace.OleDb.LinqService).sql index 219a5dc9e08a..2964afb11c46 100644 --- a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Access.Ace.OleDb.LinqService).sql @@ -27,6 +27,20 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Ace.OleDb AccessOleDb diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Ace.OleDb.LinqService).sql index 38377fb658f9..fc6cb5ab6c0f 100644 --- a/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Access.Ace.OleDb.LinqService).sql @@ -37,6 +37,22 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p VarWChar(5) -- String +SET @p = 'John0' + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Ace.OleDb AccessOleDb (asynchronously) DECLARE @FirstName VarWChar(5) -- String @@ -68,6 +84,22 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p VarWChar(5) -- String +SET @p = 'John1' + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' + BeforeExecute -- Access.Ace.OleDb AccessOleDb diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..2a841dbf2140 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +UPDATE + [Parent] [p1] + INNER JOIN [Parent] [p2] ON ([p1].[ParentID] = [p2].[ParentID]) +SET + [p1].[ParentID] = [p2].[ParentID] +WHERE + [p1].[ParentID] < 3 + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..67add377247a --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] [p] +SET + [p].[ParentID] = [p].[ParentID] + 1 +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..67add377247a --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] [p] +SET + [p].[ParentID] = [p].[ParentID] + 1 +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..346aa0b5d8eb --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,53 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +UPDATE + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON ([c_1].[ParentID] = [a_Parent].[ParentID]) +SET + [c_1].[ChildID] = [c_1].[ChildID] + 1 +WHERE + [c_1].[ChildID] = @id AND [a_Parent].[Value1] = 1 + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..d4079247e093 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +UPDATE + [Parent] [a_Parent], + [Child] [child_1] +SET + [a_Parent].[Value1] = 5 +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [a_Parent].[ParentID] + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..d4079247e093 --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,39 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +UPDATE + [Parent] [a_Parent], + [Child] [child_1] +SET + [a_Parent].[Value1] = 5 +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [a_Parent].[ParentID] + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Ace.OleDb.LinqService).sql new file mode 100644 index 000000000000..7b21b108fa7d --- /dev/null +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Access.Ace.OleDb.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int NOT NULL IDENTITY, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @FirstName VarWChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarWChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarWChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @FirstName VarWChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarWChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarWChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] [t1] +SET + [t1].[FirstName] = @FirstName, + [t1].[LastName] = @LastName, + [t1].[MiddleName] = @MiddleName, + [t1].[Gender] = @Gender +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Ace.OleDb.LinqService).sql b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Ace.OleDb.LinqService).sql index a4451e7b5a37..cedca51f8cfc 100644 --- a/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Ace.OleDb.LinqService).sql +++ b/Access.Ace.OleDb.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Access.Ace.OleDb.LinqService).sql @@ -54,3 +54,58 @@ BeforeExecute SELECT @@IDENTITY +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 1 + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @Gender WChar(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName VarWChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName VarWChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName VarWChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer -- Int32 +SET @ID = 5 + +UPDATE + [Person] [t1] +SET + [t1].[Gender] = @Gender, + [t1].[FirstName] = @Name_FirstName, + [t1].[MiddleName] = @Name_MiddleName, + [t1].[LastName] = @Name_LastName +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 1 + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/Access.Ace.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Ace.OleDb).sql b/Access.Ace.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Ace.OleDb).sql new file mode 100644 index 000000000000..ca9c23434c57 --- /dev/null +++ b/Access.Ace.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Access.Ace.OleDb).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Ace.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Ace.OleDb).sql b/Access.Ace.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Ace.OleDb).sql new file mode 100644 index 000000000000..acdfb6f52e25 --- /dev/null +++ b/Access.Ace.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Access.Ace.OleDb).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Access.Ace.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Ace.OleDb).sql b/Access.Ace.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Ace.OleDb).sql new file mode 100644 index 000000000000..acdfb6f52e25 --- /dev/null +++ b/Access.Ace.OleDb/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Access.Ace.OleDb).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Access.Ace.OleDb AccessOleDb (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From dd14d35bfe35f1cb87e6c75a9b2925be74c0b4ac Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 22:20:50 +0100 Subject: [PATCH 31/40] [Linux / Oracle 23c] baselines --- ...l4Async(Oracle.23.Managed.LinqService).sql | 18 ++ ...y2Async(Oracle.23.Managed.LinqService).sql | 30 +++ ...le1Test(Oracle.23.Managed.LinqService).sql | 9 + ...le2Test(Oracle.23.Managed.LinqService).sql | 11 + ...st1Test(Oracle.23.Managed.LinqService).sql | 9 + ...st2Test(Oracle.23.Managed.LinqService).sql | 11 + ...yncTest(Oracle.23.Managed.LinqService).sql | 18 ++ ...yncTest(Oracle.23.Managed.LinqService).sql | 15 ++ ...kipTest(Oracle.23.Managed.LinqService).sql | 16 ++ ...Default(Oracle.23.Managed.LinqService).sql | 20 ++ ...yncTest(Oracle.23.Managed.LinqService).sql | 21 ++ ...yncTest(Oracle.23.Managed.LinqService).sql | 21 ++ ...stAsync(Oracle.23.Managed.LinqService).sql | 40 ++++ ...tAsync2(Oracle.23.Managed.LinqService).sql | 40 ++++ ...ncdTest(Oracle.23.Managed.LinqService).sql | 16 ++ ...t3Async(Oracle.23.Managed.LinqService).sql | 28 +++ ...stAsync(Oracle.23.Managed.LinqService).sql | 36 +++ ...stAsync(Oracle.23.Managed.LinqService).sql | 24 ++ ...tAsync2(Oracle.23.Managed.LinqService).sql | 24 ++ ...tAsync1(Oracle.23.Managed.LinqService).sql | 28 +++ ...tAsync2(Oracle.23.Managed.LinqService).sql | 28 +++ ...stAsync(Oracle.23.Managed.LinqService).sql | 24 ++ ...tAsync2(Oracle.23.Managed.LinqService).sql | 24 ++ ...teAsync(Oracle.23.Managed.LinqService).sql | 197 ++-------------- ...teAsync(Oracle.23.Managed.LinqService).sql | 191 +--------------- ...teAsync(Oracle.23.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.23.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.23.Managed.LinqService).sql | 191 +--------------- ...orAsync(Oracle.23.Managed.LinqService).sql | 191 +--------------- ...orAsync(Oracle.23.Managed.LinqService).sql | 191 +--------------- ...teAsync(Oracle.23.Managed.LinqService).sql | 193 +--------------- ...teAsync(Oracle.23.Managed.LinqService).sql | 193 +--------------- ...t1Async(Oracle.23.Managed.LinqService).sql | 19 ++ ...ntAsync(Oracle.23.Managed.LinqService).sql | 97 ++++++++ ...edAsync(Oracle.23.Managed.LinqService).sql | 80 +++++++ ...t1Async(Oracle.23.Managed.LinqService).sql | 8 + ...t2Async(Oracle.23.Managed.LinqService).sql | 10 + ...x1Async(Oracle.23.Managed.LinqService).sql | 16 ++ ...sue4602(Oracle.23.Managed.LinqService).sql | 194 +--------------- ...7_Async(Oracle.23.Managed.LinqService).sql | 31 +++ ...saction(Oracle.23.Managed.LinqService).sql | 31 +++ ...onAsync(Oracle.23.Managed.LinqService).sql | 25 ++ ...t1Async(Oracle.23.Managed.LinqService).sql | 11 + ...18Async(Oracle.23.Managed.LinqService).sql | 14 ++ ...r1Async(Oracle.23.Managed.LinqService).sql | 7 + ...132Test(Oracle.23.Managed.LinqService).sql | 213 ++++++++++++++++++ ...c(Oracle.23.Managed.LinqService,False).sql | 16 ++ ...nc(Oracle.23.Managed.LinqService,True).sql | 16 ++ ...c(Oracle.23.Managed.LinqService,False).sql | 16 ++ ...nc(Oracle.23.Managed.LinqService,True).sql | 16 ++ ...p1Async(Oracle.23.Managed.LinqService).sql | 106 +-------- ...c(Oracle.23.Managed.LinqService,False).sql | 20 ++ ...nc(Oracle.23.Managed.LinqService,True).sql | 24 ++ ...c(Oracle.23.Managed.LinqService,False).sql | 12 + ...nc(Oracle.23.Managed.LinqService,True).sql | 12 + ...c(Oracle.23.Managed.LinqService,False).sql | 12 + ...nc(Oracle.23.Managed.LinqService,True).sql | 14 ++ ...c(Oracle.23.Managed.LinqService,False).sql | 12 + ...nc(Oracle.23.Managed.LinqService,True).sql | 14 ++ ...c(Oracle.23.Managed.LinqService,False).sql | 10 + ...nc(Oracle.23.Managed.LinqService,True).sql | 12 + ...Managed.LinqService,False,False,False).sql | 23 ++ ....Managed.LinqService,False,False,True).sql | 23 ++ ....Managed.LinqService,False,True,False).sql | 23 ++ ...3.Managed.LinqService,False,True,True).sql | 23 ++ ....Managed.LinqService,True,False,False).sql | 23 ++ ...3.Managed.LinqService,True,False,True).sql | 23 ++ ...3.Managed.LinqService,True,True,False).sql | 23 ++ ...23.Managed.LinqService,True,True,True).sql | 23 ++ ...e1Async(Oracle.23.Managed.LinqService).sql | 77 +++++++ ...leAsync(Oracle.23.Managed.LinqService).sql | 53 +++++ ...meAsync(Oracle.23.Managed.LinqService).sql | 132 +++++++++++ ...t2Async(Oracle.23.Managed.LinqService).sql | 44 ++++ ...t3Async(Oracle.23.Managed.LinqService).sql | 46 ++++ ...t4Async(Oracle.23.Managed.LinqService).sql | 46 ++++ ...meAsync(Oracle.23.Managed.LinqService).sql | 112 +++++++++ ...e1Async(Oracle.23.Managed.LinqService).sql | 98 ++++++++ ...meAsync(Oracle.23.Managed.LinqService).sql | 163 ++++++++++++++ ...e3Async(Oracle.23.Managed.LinqService).sql | 98 ++++++++ ...3xAsync(Oracle.23.Managed.LinqService).sql | 104 +++++++++ ...y1Async(Oracle.23.Managed.LinqService).sql | 15 ++ ...y2Async(Oracle.23.Managed.LinqService).sql | 15 ++ ...y4Async(Oracle.23.Managed.LinqService).sql | 34 +++ ...eryAsyn(Oracle.23.Managed.LinqService).sql | 33 +++ ...bleAsyn(Oracle.23.Managed.LinqService).sql | 31 +++ ...nsAsync(Oracle.23.Managed.LinqService).sql | 127 ++++++++--- ...llAsync(Oracle.23.Managed.LinqService).sql | 131 +++++------ ...rtAsync(Oracle.23.Managed.LinqService).sql | 126 +++++------ ...stAsync(Oracle.23.Managed.LinqService).sql | 85 ++++--- ...nc(Oracle.23.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.23.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.23.Managed.LinqService,two).sql | 80 ++++--- ...nc(Oracle.23.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.23.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.23.Managed.LinqService,two).sql | 80 ++++--- ...nc(Oracle.23.Managed.LinqService,null).sql | 80 ++++--- ...ync(Oracle.23.Managed.LinqService,one).sql | 80 ++++--- ...ync(Oracle.23.Managed.LinqService,two).sql | 80 ++++--- ...12Async(Oracle.23.Managed.LinqService).sql | 28 +++ ...e1Async(Oracle.23.Managed.LinqService).sql | 54 +++++ ...e2Async(Oracle.23.Managed.LinqService).sql | 54 +++++ ...e4Async(Oracle.23.Managed.LinqService).sql | 63 ++++++ ...n1Async(Oracle.23.Managed.LinqService).sql | 47 ++++ ...syncOld(Oracle.23.Managed.LinqService).sql | 47 ++++ ...meAsync(Oracle.23.Managed.LinqService).sql | 150 ++++++++++++ ...x1Async(Oracle.23.Managed.LinqService).sql | 57 +++++ ...inq.AsyncTests.Test(Oracle.23.Managed).sql | 18 ++ ...nq.AsyncTests.Test1(Oracle.23.Managed).sql | 9 + ...ncTests.TestForEach(Oracle.23.Managed).sql | 9 + 109 files changed, 3865 insertions(+), 2457 deletions(-) create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.23.Managed.LinqService,False).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.23.Managed.LinqService,True).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.23.Managed.LinqService,False).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.23.Managed.LinqService,True).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.23.Managed.LinqService,False).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.23.Managed.LinqService,True).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.23.Managed.LinqService,False).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.23.Managed.LinqService,True).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.23.Managed.LinqService,False).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.23.Managed.LinqService,True).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.23.Managed.LinqService,False).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.23.Managed.LinqService,True).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.23.Managed.LinqService).sql create mode 100644 Oracle.23.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.23.Managed).sql create mode 100644 Oracle.23.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.23.Managed).sql create mode 100644 Oracle.23.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.23.Managed).sql diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..f9ff7bc87f25 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" <= 3 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..9e90da458f03 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT DISTINCT + a_Parent1."ParentID" + FROM + "Child" t1 + INNER JOIN "Parent" a_Parent1 ON t1."ParentID" = a_Parent1."ParentID" + ) m_1 + INNER JOIN "Child" d + INNER JOIN "Parent" a_Parent1_1 ON d."ParentID" = a_Parent1_1."ParentID" + ON m_1."ParentID" = a_Parent1_1."ParentID" + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + a_Parent1."ParentID" +FROM + "Child" t1 + INNER JOIN "Parent" a_Parent1 ON t1."ParentID" = a_Parent1."ParentID" +GROUP BY + a_Parent1."ParentID" + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..3c1b98ccbb85 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..d80247096301 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..3c1b98ccbb85 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..d80247096301 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" > 1 + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..07378e338149 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +SELECT + CASE + WHEN :ID IN ( + SELECT + t1."PersonID" + FROM + "Person" t1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..6ab082a3d0dc --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."PersonID" = 1 +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.23.Managed.LinqService).sql index 6d6e6a3b98a4..19e5599a8cc1 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Oracle.23.Managed.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY t1."ParentID" OFFSET :skip ROWS FETCH NEXT :take ROWS ONLY +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @skip Int32 +SET @skip = 1 +DECLARE @take Int32 +SET @take = 2 + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +ORDER BY + t1."ParentID" +OFFSET :skip ROWS FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..96f019d33d9b --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 +DECLARE @p_1 Int32 +SET @p_1 = 2 +DECLARE @p_2 Int32 +SET @p_2 = 3 +DECLARE @param Int32 +SET @param = 4 + +SELECT + o."ParentID", + o."Value1" +FROM + "Parent" o +WHERE + o."ParentID" IN (:p, :p_1, :p_2) OR o."ParentID" = :param +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..c5ba2d1a1762 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..c5ba2d1a1762 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +ORDER BY + t1."ParentID", + t1."ChildID" + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..e83060d468b1 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..e83060d468b1 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" c_1 + WHERE + c_1."ParentID" = :p + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..5039789ce6e2 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = :p +ORDER BY + x."ParentID" DESC +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..00f471847e9f --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT :p ROWS ONLY + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT :p ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..6d6bfda83e13 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + CASE + WHEN :p IN ( + SELECT + c_1."ParentID" + FROM + "Child" c_1 + ) + THEN 1 + ELSE 0 + END +FROM SYS.DUAL + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..3cc263480c78 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..3cc263480c78 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..1c395b4487e5 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..1c395b4487e5 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + c_1."ParentID", + c_1."ChildID" +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..d808667d5e2b --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..d808667d5e2b --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = -1 + +SELECT + MAX(c_1."ParentID") +FROM + "Child" c_1 +WHERE + c_1."ParentID" = :p + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.23.Managed.LinqService).sql index 3731f1086e08..a562f97cd416 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Oracle.23.Managed.LinqService).sql @@ -1,183 +1,20 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "AsyncDataTable" c_1 + WHERE + c_1."Id" = :p ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; + THEN 1 + ELSE 0 + END +FROM SYS.DUAL diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.23.Managed.LinqService).sql index 3731f1086e08..8741136a0da9 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Oracle.23.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.23.Managed.LinqService).sql index 3731f1086e08..01d083c9b441 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Oracle.23.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 1 ROWS ONLY diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.23.Managed.LinqService).sql index 3731f1086e08..01d083c9b441 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Oracle.23.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 1 ROWS ONLY diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.23.Managed.LinqService).sql index 3731f1086e08..8741136a0da9 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Oracle.23.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.23.Managed.LinqService).sql index 3731f1086e08..1f1b8d3607b3 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Oracle.23.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MAX(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.23.Managed.LinqService).sql index 3731f1086e08..2d569fea4674 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Oracle.23.Managed.LinqService).sql @@ -1,183 +1,12 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + MIN(c_1."Id") +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" > :p diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.23.Managed.LinqService).sql index 3731f1086e08..ad342a95d542 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Oracle.23.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.23.Managed.LinqService).sql index 3731f1086e08..ad342a95d542 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Oracle.23.Managed.LinqService).sql @@ -1,183 +1,14 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Id Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - :Id -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 2 + +SELECT + :p as "Id", + c_1."Id" as "Id_1" +FROM + "AsyncDataTable" c_1 +WHERE + c_1."Id" = :p +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..da159c1bca59 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" = 1 +UNION ALL +SELECT + p_1."ParentID", + p_1."Value1" +FROM + "Parent" p_1 +WHERE + p_1."ParentID" = 2 + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.23.Managed.LinqService).sql index e2562d1aad69..af63141a928e 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Oracle.23.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value Varchar2(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 3' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" obj +SET + "Stamp" = obj."Stamp" + 1, + "Value" = :Value +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" t1 +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" obj +WHERE + obj."Id" = :Id AND obj."Stamp" = :Stamp + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.23.Managed.LinqService).sql index eff54510bdb4..f3c779724fef 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Oracle.23.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 +DECLARE @Value Varchar2(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + :Id, + :Stamp, + :Value +) + +BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 1' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" r +SET + "Stamp" = r."Stamp" + 1, + "Value" = :Value +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Value Varchar2(7) -- String +SET @Value = 'value 2' +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" r +SET + "Stamp" = r."Stamp" + 1, + "Value" = :Value +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 @@ -28,6 +84,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 2 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 @@ -38,6 +106,18 @@ SELECT FROM "ConcurrencyFiltered" t1 +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Id Int32 +SET @Id = 1 +DECLARE @Stamp Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" r +WHERE + r."Id" = 1 AND r."Id" = :Id AND r."Stamp" = :Stamp + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..b2db65c7bbd5 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" t1 + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..6254746cea64 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" > 2 + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..fa392bfda8f0 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" c_1 + LEFT JOIN "Parent" a_Parent ON c_1."ParentID" = a_Parent."ParentID" + WHERE + a_Parent."ParentID" = t1."ParentID" + )) +FROM + "Parent" t1 + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.23.Managed.LinqService).sql index f165263a3dfd..7d602719cafd 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Oracle.23.Managed.LinqService).sql @@ -1,187 +1,11 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicParent" - ( - ID Int NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY (ID) - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -CREATE SEQUENCE "SIDENTITY_DynamicParent" - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -CREATE OR REPLACE TRIGGER "TIDENTITY_DynamicParent" -BEFORE INSERT ON "DynamicParent" FOR EACH ROW -BEGIN - SELECT "SIDENTITY_DynamicParent".NEXTVAL INTO :NEW.ID FROM dual; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicChild" - ( - ID Int NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY (ID) - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -CREATE SEQUENCE "SIDENTITY_DynamicChild" - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -CREATE OR REPLACE TRIGGER "TIDENTITY_DynamicChild" -BEFORE INSERT ON "DynamicChild" FOR EACH ROW -BEGIN - SELECT "SIDENTITY_DynamicChild".NEXTVAL INTO :NEW.ID FROM dual; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - BEGIN - EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -4080 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -2289 THEN - RAISE; - END IF; - END; - BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; - EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; - END; -END; +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + it.ID +FROM + "DynamicParent" it + LEFT JOIN "DynamicChild" a_Child ON it.ID = a_Child."ParentID" +WHERE + a_Child.ID = 123 diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.23.Managed.LinqService).sql index b7d67da21de9..98abca871d11 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Oracle.23.Managed.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransactionAsync(ReadCommitted) BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.23.Managed.LinqService).sql index 16d50444467c..92ac9ee7e6d8 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Oracle.23.Managed.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + m_1."ParentID", + d."ParentID", + d."ChildID" +FROM + ( + SELECT + x."ParentID" + FROM + "Parent" x + WHERE + x."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) m_1 + INNER JOIN "Child" d ON m_1."ParentID" = d."ParentID" + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."ParentID", + x."Value1" +FROM + "Parent" x +WHERE + x."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransaction BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..6083793a9ca7 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" a_Children + INNER JOIN "GrandChild" a_GrandChildren ON a_Children."ParentID" = a_GrandChildren."ParentID" AND a_Children."ChildID" = a_GrandChildren."ChildID" + WHERE + p."ParentID" = a_Children."ParentID" + ) +FROM + "Parent" p + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..c0d1cfc89380 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 +WHERE + t1."Value1" = 1 + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..3cfbff413c77 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT DISTINCT + p1."PersonID", + p1."Gender", + p1."FirstName", + p1."LastName" +FROM + "Person" p1 +WHERE + p1."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + p1."Gender" = 'F' + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..4fb6529f5940 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,7 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + 1 +FROM SYS.DUAL + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..732b4003cefa --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + x."MiddleName", + COUNT(*) +FROM + "Person" x +WHERE + x."MiddleName" IS NOT NULL +GROUP BY + x."MiddleName" +UNION ALL +SELECT + x_1."MiddleName", + COUNT(*) +FROM + "Person" x_1 +WHERE + x_1."MiddleName" IS NOT NULL +GROUP BY + x_1."MiddleName" +UNION ALL +SELECT + x_2."MiddleName", + COUNT(*) +FROM + "Person" x_2 +WHERE + x_2."MiddleName" IS NOT NULL +GROUP BY + x_2."MiddleName" +UNION ALL +SELECT + x_3."MiddleName", + COUNT(*) +FROM + "Person" x_3 +WHERE + x_3."MiddleName" IS NOT NULL +GROUP BY + x_3."MiddleName" +UNION ALL +SELECT + x_4."MiddleName", + COUNT(*) +FROM + "Person" x_4 +WHERE + x_4."MiddleName" IS NOT NULL +GROUP BY + x_4."MiddleName" +UNION ALL +SELECT + x_5."MiddleName", + COUNT(*) +FROM + "Person" x_5 +WHERE + x_5."MiddleName" IS NOT NULL +GROUP BY + x_5."MiddleName" +UNION ALL +SELECT + x_6."MiddleName", + COUNT(*) +FROM + "Person" x_6 +WHERE + x_6."MiddleName" IS NOT NULL +GROUP BY + x_6."MiddleName" +UNION ALL +SELECT + x_7."MiddleName", + COUNT(*) +FROM + "Person" x_7 +WHERE + x_7."MiddleName" IS NOT NULL +GROUP BY + x_7."MiddleName" +UNION ALL +SELECT + x_8."MiddleName", + COUNT(*) +FROM + "Person" x_8 +WHERE + x_8."MiddleName" IS NOT NULL +GROUP BY + x_8."MiddleName" +UNION ALL +SELECT + x_9."MiddleName", + COUNT(*) +FROM + "Person" x_9 +WHERE + x_9."MiddleName" IS NOT NULL +GROUP BY + x_9."MiddleName" +UNION ALL +SELECT + x_10."MiddleName", + COUNT(*) +FROM + "Person" x_10 +WHERE + x_10."MiddleName" IS NOT NULL +GROUP BY + x_10."MiddleName" +UNION ALL +SELECT + x_11."MiddleName", + COUNT(*) +FROM + "Person" x_11 +WHERE + x_11."MiddleName" IS NOT NULL +GROUP BY + x_11."MiddleName" +UNION ALL +SELECT + x_12."MiddleName", + COUNT(*) +FROM + "Person" x_12 +WHERE + x_12."MiddleName" IS NOT NULL +GROUP BY + x_12."MiddleName" +UNION ALL +SELECT + x_13."MiddleName", + COUNT(*) +FROM + "Person" x_13 +WHERE + x_13."MiddleName" IS NOT NULL +GROUP BY + x_13."MiddleName" +UNION ALL +SELECT + x_14."MiddleName", + COUNT(*) +FROM + "Person" x_14 +WHERE + x_14."MiddleName" IS NOT NULL +GROUP BY + x_14."MiddleName" +UNION ALL +SELECT + x_15."MiddleName", + COUNT(*) +FROM + "Person" x_15 +WHERE + x_15."MiddleName" IS NOT NULL +GROUP BY + x_15."MiddleName" +UNION ALL +SELECT + x_16."MiddleName", + COUNT(*) +FROM + "Person" x_16 +WHERE + x_16."MiddleName" IS NOT NULL +GROUP BY + x_16."MiddleName" +UNION ALL +SELECT + x_17."MiddleName", + COUNT(*) +FROM + "Person" x_17 +WHERE + x_17."MiddleName" IS NOT NULL +GROUP BY + x_17."MiddleName" +UNION ALL +SELECT + x_18."MiddleName", + COUNT(*) +FROM + "Person" x_18 +WHERE + x_18."MiddleName" IS NOT NULL +GROUP BY + x_18."MiddleName" +UNION ALL +SELECT + x_19."MiddleName", + COUNT(*) +FROM + "Person" x_19 +WHERE + x_19."MiddleName" IS NOT NULL +GROUP BY + x_19."MiddleName" +UNION ALL +SELECT + x_20."MiddleName", + COUNT(*) +FROM + "Person" x_20 +WHERE + x_20."MiddleName" IS NOT NULL +GROUP BY + x_20."MiddleName" + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.23.Managed.LinqService,False).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.23.Managed.LinqService,False).sql new file mode 100644 index 000000000000..2801ef8e3aa2 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.23.Managed.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.23.Managed.LinqService,True).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.23.Managed.LinqService,True).sql new file mode 100644 index 000000000000..2801ef8e3aa2 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Oracle.23.Managed.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.23.Managed.LinqService,False).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.23.Managed.LinqService,False).sql new file mode 100644 index 000000000000..2801ef8e3aa2 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.23.Managed.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.23.Managed.LinqService,True).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.23.Managed.LinqService,True).sql new file mode 100644 index 000000000000..2801ef8e3aa2 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Oracle.23.Managed.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 3 + +SELECT + p."ParentID", + p."Value1" +FROM + "Parent" p +WHERE + p."ParentID" > 1 +ORDER BY + p."ParentID" +OFFSET :n ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.23.Managed.LinqService).sql index 71bb0731b002..fdc9923b8e5c 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Oracle.23.Managed.LinqService).sql @@ -1,97 +1,13 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "TakeSkipClass" - ( - "Value" VarChar(10) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 -DECLARE @Value Varchar2(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - :Value -) - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @skip Int32 +SET @skip = 3 + +SELECT + t1."Value" as "Value_1" +FROM + "TakeSkipClass" t1 +ORDER BY + t1."Value" +OFFSET :skip ROWS diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.23.Managed.LinqService,False).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.23.Managed.LinqService,False).sql index 0d25bd46003b..86a6dcb43de9 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.23.Managed.LinqService,False).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.23.Managed.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" ch FETCH NEXT 3 ROWS ONLY +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.23.Managed.LinqService,True).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.23.Managed.LinqService,True).sql index b93d1998504e..67b2a5a4905f 100644 --- a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.23.Managed.LinqService,True).sql +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Oracle.23.Managed.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" ch FETCH NEXT :take ROWS ONLY +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 2 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT :take ROWS ONLY + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.23.Managed.LinqService,False).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.23.Managed.LinqService,False).sql new file mode 100644 index 000000000000..83047d7bbdec --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.23.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :n ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.23.Managed.LinqService,True).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.23.Managed.LinqService,True).sql new file mode 100644 index 000000000000..83047d7bbdec --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Oracle.23.Managed.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @n Int32 +SET @n = 1 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :n ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.23.Managed.LinqService,False).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.23.Managed.LinqService,False).sql new file mode 100644 index 000000000000..e76f43004baf --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.23.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.23.Managed.LinqService,True).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.23.Managed.LinqService,True).sql new file mode 100644 index 000000000000..e25037f90323 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Oracle.23.Managed.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" > 3 OR ch."ChildID" < 4 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.23.Managed.LinqService,False).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.23.Managed.LinqService,False).sql new file mode 100644 index 000000000000..9b82e80f4a4a --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.23.Managed.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.23.Managed.LinqService,True).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.23.Managed.LinqService,True).sql new file mode 100644 index 000000000000..267407954b6b --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Oracle.23.Managed.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + ch."ParentID", + ch."ChildID" +FROM + "Child" ch +WHERE + ch."ChildID" >= 0 AND ch."ChildID" <= 100 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.23.Managed.LinqService,False).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.23.Managed.LinqService,False).sql new file mode 100644 index 000000000000..995eb1b47bc2 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.23.Managed.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT 3 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.23.Managed.LinqService,True).sql b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.23.Managed.LinqService,True).sql new file mode 100644 index 000000000000..bb5399969ce5 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Oracle.23.Managed.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @take Int32 +SET @take = 3 + +SELECT + t1."ParentID", + t1."ChildID" +FROM + "Child" t1 +FETCH NEXT :take ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,False,False).sql b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,False,False).sql index 6a3fa36e4ae9..f6ab5e5ad293 100644 --- a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,False,False).sql +++ b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,False,False).sql @@ -10,3 +10,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,False,True).sql b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,False,True).sql index 7d4e269f224f..85851aa8a1c2 100644 --- a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,False,True).sql +++ b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,False,True).sql @@ -19,3 +19,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,True,False).sql b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,True,False).sql index 6a3fa36e4ae9..f6ab5e5ad293 100644 --- a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,True,False).sql +++ b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,True,False).sql @@ -10,3 +10,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,True,True).sql b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,True,True).sql index 7d4e269f224f..85851aa8a1c2 100644 --- a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,True,True).sql +++ b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,False,True,True).sql @@ -19,3 +19,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,False,False).sql b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,False,False).sql index 9016943f74a2..0c32c3060af2 100644 --- a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,False,False).sql +++ b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,False,False).sql @@ -17,3 +17,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2"@"free" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,False,True).sql b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,False,True).sql index 1bdfcdd1e7f6..d2beae6dbdc4 100644 --- a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,False,True).sql +++ b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,False,True).sql @@ -26,3 +26,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2"@"free" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,True,False).sql b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,True,False).sql index 9016943f74a2..0c32c3060af2 100644 --- a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,True,False).sql +++ b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,True,False).sql @@ -17,3 +17,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "Issue681Table2"@"free" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,True,True).sql b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,True,True).sql index 1bdfcdd1e7f6..d2beae6dbdc4 100644 --- a/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,True,True).sql +++ b/Oracle.23.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Oracle.23.Managed.LinqService,True,True,True).sql @@ -26,3 +26,26 @@ EXCEPTION END IF; END; +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE SYSTEM."Issue681Table2"@"free" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..444228c6ce95 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,77 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TestTable"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "TestTable" +( + ID Int NOT NULL, + "Field1" VarChar(50) NULL, + "Field2" VarChar(255) NULL, + "CreatedOn" timestamp NULL, + + CONSTRAINT "PK_TestTable" PRIMARY KEY (ID) +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_TestTable" + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_TestTable" +BEFORE INSERT ON "TestTable" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_TestTable".NEXTVAL INTO :NEW.ID FROM dual; +END; + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1.ID, + t1."Field1", + t1."Field2", + t1."CreatedOn" +FROM + "TestTable" t1 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_TestTable"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_TestTable"'; + EXECUTE IMMEDIATE 'DROP TABLE "TestTable"'; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.23.Managed.LinqService).sql index 61541cd7b51b..efd75789e95d 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Oracle.23.Managed.LinqService).sql @@ -1,4 +1,45 @@ BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE ' + CREATE TABLE "TempTable" + ( + ID Int NOT NULL + ) + '; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -955 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "TempTable" +( + ID +) +SELECT + p."ParentID" +FROM + "Parent" p + +BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 SELECT @@ -7,3 +48,15 @@ FROM "Parent" p INNER JOIN "TempTable" t ON p."ParentID" = t.ID +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..33e8ea67d712 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,132 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ID Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson_ol" t1 +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..b3384bbaa71b --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..e39e0ae3e3c6 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..e39e0ae3e3c6 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + c_1."ParentID", + :id +FROM + "Child" c_1 +WHERE + c_1."ChildID" = 11 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +DELETE FROM + "Child" c_1 +WHERE + c_1."ChildID" > 1000 + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.23.Managed.LinqService).sql index e6b0b1ed82e7..1cfeff8398e6 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Oracle.23.Managed.LinqService).sql @@ -1,5 +1,59 @@ BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) DECLARE @FirstName Varchar2(6) -- String SET @FirstName = 'Steven' DECLARE @LastName Varchar2(4) -- String @@ -58,3 +112,61 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" p +WHERE + p."FirstName" = 'Steven' AND p."LastName" = 'King' AND + p."Gender" = 'M' + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.23.Managed.LinqService).sql index 2359eaca851d..590f06cae56b 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Oracle.23.Managed.LinqService).sql @@ -38,3 +38,101 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc0' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc1' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 5 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'abc2' + +MERGE INTO "Patient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..133f02d1f835 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,163 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPatient" +( + "PersonID" Int NOT NULL, + "Diagnosis" VarChar(255) NULL, + + CONSTRAINT "PK_xxPatient" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 1 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @PersonID Int32 +SET @PersonID = 2 +DECLARE @Diagnosis Varchar2(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" t1 +USING (SELECT :PersonID AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = :Diagnosis +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :PersonID, + :Diagnosis + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" t1 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.23.Managed.LinqService).sql index 2359eaca851d..940ba2d98f6c 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Oracle.23.Managed.LinqService).sql @@ -38,3 +38,101 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 0 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 1 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 +DECLARE @i Int32 +SET @i = 2 + +MERGE INTO "Patient" t1 +USING (SELECT :id AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.23.Managed.LinqService).sql index 2359eaca851d..b6aa5dc71dff 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Oracle.23.Managed.LinqService).sql @@ -38,3 +38,107 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 0 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 1 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id2 Int32 +SET @id2 = 5 +DECLARE @i Int32 +SET @i = 2 +DECLARE @id Int32 +SET @id = 5 + +MERGE INTO "Patient" t1 +USING (SELECT :id2 AS "PersonID" FROM SYS.DUAL) s ON +( + t1."PersonID" = s."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(Length(t1."Diagnosis") + :i AS VarChar(255)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + :id, + 'abc' + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + p."PersonID", + p."Diagnosis" +FROM + "Patient" p +WHERE + p."PersonID" = :id +FETCH NEXT 2 ROWS ONLY + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.23.Managed.LinqService).sql index 6142890e24fd..14e276cb5f0d 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Oracle.23.Managed.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.23.Managed.LinqService).sql index 6142890e24fd..14e276cb5f0d 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Oracle.23.Managed.LinqService).sql @@ -26,6 +26,21 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = 'John' AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.23.Managed.LinqService).sql index 1520101a261d..cbab645f379a 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Oracle.23.Managed.LinqService).sql @@ -36,6 +36,23 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Varchar2(5) -- String +SET @p = 'John0' + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) DECLARE @FirstName Varchar2(5) -- String @@ -66,6 +83,23 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Varchar2(5) -- String +SET @p = 'John1' + +SELECT + p."FirstName", + p."PersonID" as ID, + p."LastName", + p."MiddleName", + p."Gender" +FROM + "Person" p +WHERE + p."FirstName" = :p AND p."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.23.Managed.LinqService).sql index cfeef3da5b78..6dba7e238053 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Oracle.23.Managed.LinqService).sql @@ -218,6 +218,39 @@ VALUES :Field4 ) +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +MERGE INTO "TestMerge1" Target +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 + WHERE + t1."Id" = 5 +) "Source" +ON (Target."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.23.Managed.LinqService).sql index cfeef3da5b78..b53ba8cd64c6 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Oracle.23.Managed.LinqService).sql @@ -218,6 +218,37 @@ VALUES :Field4 ) +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +MERGE INTO "TestMerge1" Target +USING ( + SELECT + t1."Id" as "source_Id", + t1."Field1" as "source_Field1", + t1."Field2" as "source_Field2", + t1."Field4" as "source_Field4" + FROM + "TestMerge2" t1 +) "Source" +ON (Target."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- Oracle.23.Managed Oracle.Managed Oracle12 diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.23.Managed.LinqService).sql index b5fa90802a43..beb98ae084dc 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ExpressionsAsync(Oracle.23.Managed.LinqService).sql @@ -1,43 +1,98 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_N" < 0 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + 3002, + "source_N" + ) +SELECT + 42 as "source_N", + 3000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" t1 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 3002 BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT ALL +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + 4002, + "source_N" + ) +SELECT + 4000 as "source_ID", + 42 as "source_N" +FROM SYS.DUAL + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" t1 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 4001 OR x.ID = 4002 diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.23.Managed.LinqService).sql index 1037c2d74ab3..15cd4c8b973e 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAllAsync(Oracle.23.Managed.LinqService).sql @@ -1,85 +1,70 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_N" > 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN "source_N" < 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) +WHEN 1 = 1 THEN + INTO "Dest2" + ( + ID, + "Int" + ) + VALUES + ( + "source_ID" + 3, + "source_ID" + 1 + ) +SELECT + 42 as "source_N", + 1000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 1001 BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest2" - ( - ID Int NOT NULL, - "Int" Int NOT NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest2" x +WHERE + x.ID = 1003 diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.23.Managed.LinqService).sql index 1037c2d74ab3..b3a50a448e8f 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertAsync(Oracle.23.Managed.LinqService).sql @@ -1,85 +1,65 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) + INTO "Dest2" + ( + ID, + "Int" + ) + VALUES + ( + "source_ID" + 3, + "source_ID" + 1 + ) +SELECT + 1000 as "source_ID", + 42 as "source_N" +FROM SYS.DUAL BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest2" - ( - ID Int NOT NULL, - "Int" Int NOT NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest2"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest2" x +WHERE + x.ID = 1003 diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.23.Managed.LinqService).sql index b5fa90802a43..4d5a856227fc 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.InsertFirstAsync(Oracle.23.Managed.LinqService).sql @@ -1,43 +1,60 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT FIRST +WHEN "source_N" < 40 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 1, + "source_N" + ) +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 2, + "source_N" + ) +ELSE + INTO "Dest1" + ( + ID, + "Value" + ) + VALUES + ( + "source_ID" + 3, + "source_N" + ) +SELECT + 42 as "source_N", + 1000 as "source_ID" +FROM SYS.DUAL BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" t1 BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + COUNT(*) +FROM + "Dest1" x +WHERE + x.ID = 1003 diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.23.Managed.LinqService,null).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.23.Managed.LinqService,null).sql index b5fa90802a43..2fa180480f92 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.23.Managed.LinqService,null).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.23.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2 -- String +SET @value = NULL -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.23.Managed.LinqService,one).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.23.Managed.LinqService,one).sql index b5fa90802a43..02e3a9e19191 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.23.Managed.LinqService,one).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.23.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.23.Managed.LinqService,two).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.23.Managed.LinqService,two).sql index b5fa90802a43..ec80205460da 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.23.Managed.LinqService,two).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInConditionAsync(Oracle.23.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN 1 = 0 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN 1 = 1 THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.23.Managed.LinqService,null).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.23.Managed.LinqService,null).sql index b5fa90802a43..49c097573144 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.23.Managed.LinqService,null).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.23.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2 -- String +SET @value = NULL +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.23.Managed.LinqService,one).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.23.Managed.LinqService,one).sql index b5fa90802a43..b491765a7fc5 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.23.Managed.LinqService,one).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.23.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.23.Managed.LinqService,two).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.23.Managed.LinqService,two).sql index b5fa90802a43..f0a2891e968e 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.23.Managed.LinqService,two).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInInsertAsync(Oracle.23.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' +DECLARE @id2 Int32 +SET @id2 = 4000 -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + :value + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + :value + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.23.Managed.LinqService,null).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.23.Managed.LinqService,null).sql index b5fa90802a43..feb09cf32d8a 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.23.Managed.LinqService,null).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.23.Managed.LinqService,null).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2 -- String +SET @value = NULL -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.23.Managed.LinqService,one).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.23.Managed.LinqService,one).sql index b5fa90802a43..f0a0f97ac081 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.23.Managed.LinqService,one).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.23.Managed.LinqService,one).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'one' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.23.Managed.LinqService,two).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.23.Managed.LinqService,two).sql index b5fa90802a43..93ac8df748ef 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.23.Managed.LinqService,two).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/MultiInsertTests/Tests.xUpdate.MultiInsertTests.ParametersInSourceAsync(Oracle.23.Managed.LinqService,two).sql @@ -1,43 +1,49 @@ BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id1 Int32 +SET @id1 = 3000 +DECLARE @id2 Int32 +SET @id2 = 4000 +DECLARE @value Varchar2(3) -- String +SET @value = 'two' -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +INSERT ALL +WHEN "source_Value" IS NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id1, + "source_Value" + ) +WHEN "source_Value" IS NOT NULL THEN + INTO "Dest1" + ( + ID, + "StringValue" + ) + VALUES + ( + :id2, + "source_Value" + ) +SELECT + :value as "source_Value" +FROM SYS.DUAL BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) -BEGIN - EXECUTE IMMEDIATE ' - CREATE TABLE "Dest1" - ( - ID Int NOT NULL, - "Value" SmallInt NULL, - "StringValue" VarChar(255) NULL - ) - '; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -955 THEN - RAISE; - END IF; -END; - -BeforeExecute --- Oracle.23.Managed Oracle.Managed Oracle12 - -BEGIN - EXECUTE IMMEDIATE 'DROP TABLE "Dest1"'; -EXCEPTION - WHEN OTHERS THEN - IF SQLCODE != -942 THEN - RAISE; - END IF; -END; +SELECT + t1.ID, + t1."Value" as "Value_1", + t1."StringValue" +FROM + "Dest1" t1 +WHERE + t1.ID > 1000 +FETCH NEXT 2 ROWS ONLY diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..96852ca6fd74 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "ParentID" = ( + SELECT + p2_1."ParentID" + FROM + "Parent" p1_1 + INNER JOIN "Parent" p2_1 ON p1_1."ParentID" = p2_1."ParentID" + WHERE + p1_1."ParentID" < 3 AND "Parent"."ParentID" = p1_1."ParentID" AND + ("Parent"."Value1" = p1_1."Value1" OR "Parent"."Value1" IS NULL AND p1_1."Value1" IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + "Parent" p1 + INNER JOIN "Parent" p2 ON p1."ParentID" = p2."ParentID" + WHERE + p1."ParentID" < 3 AND "Parent"."ParentID" = p1."ParentID" AND + ("Parent"."Value1" = p1."Value1" OR "Parent"."Value1" IS NULL AND p1."Value1" IS NULL) + ) + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..e80be79a6015 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" p +SET + "ParentID" = p."ParentID" + 1 +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..e80be79a6015 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 +DECLARE @Value1 Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + :ParentID, + :Value1 +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @ParentID Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" p +SET + "ParentID" = p."ParentID" + 1 +WHERE + p."ParentID" = :ParentID + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" p +WHERE + p."ParentID" = :p + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..edf41d79703e --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + :id +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :id + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +WHERE + EXISTS( + SELECT + * + FROM + "Child" c_1 + LEFT JOIN "Parent" a_Parent ON c_1."ParentID" = a_Parent."ParentID" + WHERE + c_1."ChildID" = :id AND + a_Parent."Value1" = 1 AND + "Child"."ParentID" = c_1."ParentID" AND + "Child"."ChildID" = c_1."ChildID" + ) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @p Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" c_1 +WHERE + c_1."ChildID" = :p + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..369d65c4825f --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" child_1 + LEFT JOIN "Parent" a_Parent ON child_1."ParentID" = a_Parent."ParentID" + WHERE + child_1."ChildID" = 10000 AND "Parent"."ParentID" = a_Parent."ParentID" AND + ("Parent"."Value1" = a_Parent."Value1" OR "Parent"."Value1" IS NULL AND a_Parent."Value1" IS NULL) + ) + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..369d65c4825f --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" child_1 + LEFT JOIN "Parent" a_Parent ON child_1."ParentID" = a_Parent."ParentID" + WHERE + child_1."ChildID" = 10000 AND "Parent"."ParentID" = a_Parent."ParentID" AND + ("Parent"."Value1" = a_Parent."Value1" OR "Parent"."Value1" IS NULL AND a_Parent."Value1" IS NULL) + ) + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.23.Managed.LinqService).sql new file mode 100644 index 000000000000..adbaef8cc6c7 --- /dev/null +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Oracle.23.Managed.LinqService).sql @@ -0,0 +1,150 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -4080 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -2289 THEN + RAISE; + END IF; + END; + BEGIN + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; + EXCEPTION + WHEN OTHERS THEN + IF SQLCODE != -942 THEN + RAISE; + END IF; + END; +END; + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE TABLE "xxPerson_ol" +( + "FirstName" VarChar(255) NOT NULL, + "PersonID" Int NOT NULL, + "LastName" VarChar(255) NOT NULL, + "MiddleName" VarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson_ol" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE SEQUENCE "SIDENTITY_xxPerson_ol" + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +CREATE OR REPLACE TRIGGER "TIDENTITY_xxPerson_ol" +BEFORE INSERT ON "xxPerson_ol" FOR EACH ROW +BEGIN + SELECT "SIDENTITY_xxPerson_ol".NEXTVAL INTO :NEW."PersonID" FROM dual; +END; + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2 -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson_ol" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + :FirstName, + :LastName, + :MiddleName, + :Gender +) + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson_ol" t1 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @FirstName Varchar2(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName Varchar2(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName Varchar2(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Int32 +SET @ID = 1 + +UPDATE + "xxPerson_ol" t1 +SET + "FirstName" = :FirstName, + "LastName" = :LastName, + "MiddleName" = :MiddleName, + "Gender" = :Gender +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."FirstName", + t1."PersonID" as ID, + t1."LastName", + t1."MiddleName", + t1."Gender" +FROM + "xxPerson_ol" t1 +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +BEGIN + EXECUTE IMMEDIATE 'DROP TRIGGER "TIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP SEQUENCE "SIDENTITY_xxPerson_ol"'; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson_ol"'; +END; + diff --git a/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.23.Managed.LinqService).sql b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.23.Managed.LinqService).sql index b8c761a76d2e..50df4f2a1229 100644 --- a/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.23.Managed.LinqService).sql +++ b/Oracle.23.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Oracle.23.Managed.LinqService).sql @@ -38,3 +38,60 @@ VALUES RETURNING "PersonID" INTO :IDENTITY_PARAMETER +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + t1."PersonID" as ID, + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @Gender Varchar2(1) -- String +SET @Gender = 'M' +DECLARE @Name_FirstName Varchar2(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName Varchar2 -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName Varchar2(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Int32 +SET @ID = 5 + +UPDATE + "Person" t1 +SET + "Gender" = :Gender, + "FirstName" = :Name_FirstName, + "MiddleName" = :Name_MiddleName, + "LastName" = :Name_LastName +WHERE + t1."PersonID" = :ID + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) +DECLARE @id Int32 +SET @id = 5 + +SELECT + t1."PersonID" as ID, + t1."Gender", + t1."FirstName", + t1."MiddleName", + t1."LastName" +FROM + "Person" t1 +WHERE + t1."PersonID" = :id +FETCH NEXT 1 ROWS ONLY + diff --git a/Oracle.23.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.23.Managed).sql b/Oracle.23.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.23.Managed).sql new file mode 100644 index 000000000000..b3b4eb3a7f3f --- /dev/null +++ b/Oracle.23.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Oracle.23.Managed).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.23.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.23.Managed).sql b/Oracle.23.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.23.Managed).sql new file mode 100644 index 000000000000..3c1b98ccbb85 --- /dev/null +++ b/Oracle.23.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Oracle.23.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + diff --git a/Oracle.23.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.23.Managed).sql b/Oracle.23.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.23.Managed).sql new file mode 100644 index 000000000000..3c1b98ccbb85 --- /dev/null +++ b/Oracle.23.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Oracle.23.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Oracle.23.Managed Oracle.Managed Oracle12 (asynchronously) + +SELECT + t1."ParentID", + t1."Value1" +FROM + "Parent" t1 + From 4ce7ded506307981641bea09c2dd3c1cfebf955f Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 21:26:04 +0000 Subject: [PATCH 32/40] [Linux / Sybase ASE 16] baselines --- ....All4Async(Sybase.Managed.LinqService).sql | 17 ++ ...upBy2Async(Sybase.Managed.LinqService).sql | 30 +++ ...rable1Test(Sybase.Managed.LinqService).sql | 9 + ...rable2Test(Sybase.Managed.LinqService).sql | 11 + ...eCast1Test(Sybase.Managed.LinqService).sql | 9 + ...eCast2Test(Sybase.Managed.LinqService).sql | 11 + ...sAsyncTest(Sybase.Managed.LinqService).sql | 17 ++ ...tAsyncTest(Sybase.Managed.LinqService).sql | 14 ++ ...keSkipTest(Sybase.Managed.LinqService).sql | 11 + ...tOrDefault(Sybase.Managed.LinqService).sql | 19 ++ ...pAsyncTest(Sybase.Managed.LinqService).sql | 21 ++ ...tAsyncTest(Sybase.Managed.LinqService).sql | 21 ++ ...yTestAsync(Sybase.Managed.LinqService).sql | 38 ++++ ...TestAsync2(Sybase.Managed.LinqService).sql | 38 ++++ ...AsyncdTest(Sybase.Managed.LinqService).sql | 15 ++ ...Test3Async(Sybase.Managed.LinqService).sql | 26 +++ ...sTestAsync(Sybase.Managed.LinqService).sql | 34 +++ ...tTestAsync(Sybase.Managed.LinqService).sql | 24 ++ ...TestAsync2(Sybase.Managed.LinqService).sql | 24 ++ ...TestAsync1(Sybase.Managed.LinqService).sql | 26 +++ ...TestAsync2(Sybase.Managed.LinqService).sql | 26 +++ ...xTestAsync(Sybase.Managed.LinqService).sql | 24 ++ ...TestAsync2(Sybase.Managed.LinqService).sql | 24 ++ ...icateAsync(Sybase.Managed.LinqService).sql | 178 ++------------- ...icateAsync(Sybase.Managed.LinqService).sql | 173 +------------- ...icateAsync(Sybase.Managed.LinqService).sql | 174 +------------- ...icateAsync(Sybase.Managed.LinqService).sql | 174 +------------- ...icateAsync(Sybase.Managed.LinqService).sql | 173 +------------- ...ectorAsync(Sybase.Managed.LinqService).sql | 173 +------------- ...ectorAsync(Sybase.Managed.LinqService).sql | 173 +------------- ...icateAsync(Sybase.Managed.LinqService).sql | 174 +------------- ...icateAsync(Sybase.Managed.LinqService).sql | 174 +------------- ...ncat1Async(Sybase.Managed.LinqService).sql | 19 ++ ...ementAsync(Sybase.Managed.LinqService).sql | 99 ++++++++ ...teredAsync(Sybase.Managed.LinqService).sql | 84 +++++++ ...ount1Async(Sybase.Managed.LinqService).sql | 8 + ...ount2Async(Sybase.Managed.LinqService).sql | 10 + ...yMax1Async(Sybase.Managed.LinqService).sql | 16 ++ ....Issue4602(Sybase.Managed.LinqService).sql | 58 +---- ...4057_Async(Sybase.Managed.LinqService).sql | 29 +++ ...ransaction(Sybase.Managed.LinqService).sql | 29 +++ ...ssionAsync(Sybase.Managed.LinqService).sql | 25 ++ ...Cast1Async(Sybase.Managed.LinqService).sql | 11 + ...est18Async(Sybase.Managed.LinqService).sql | 14 ++ ...eter1Async(Sybase.Managed.LinqService).sql | 6 + ...ue3132Test(Sybase.Managed.LinqService).sql | 213 ++++++++++++++++++ ...sync(Sybase.Managed.LinqService,False).sql | 13 ++ ...Async(Sybase.Managed.LinqService,True).sql | 13 ++ ...sync(Sybase.Managed.LinqService,False).sql | 13 ++ ...Async(Sybase.Managed.LinqService,True).sql | 13 ++ ...Skip1Async(Sybase.Managed.LinqService).sql | 85 +------ ...sync(Sybase.Managed.LinqService,False).sql | 18 ++ ...Async(Sybase.Managed.LinqService,True).sql | 18 ++ ...sync(Sybase.Managed.LinqService,False).sql | 9 + ...Async(Sybase.Managed.LinqService,True).sql | 9 + ...sync(Sybase.Managed.LinqService,False).sql | 11 + ...Async(Sybase.Managed.LinqService,True).sql | 11 + ...sync(Sybase.Managed.LinqService,False).sql | 11 + ...Async(Sybase.Managed.LinqService,True).sql | 11 + ...sync(Sybase.Managed.LinqService,False).sql | 9 + ...Async(Sybase.Managed.LinqService,True).sql | 9 + ...Managed.LinqService,False,False,False).sql | 17 ++ ....Managed.LinqService,False,False,True).sql | 17 ++ ....Managed.LinqService,False,True,False).sql | 17 ++ ...e.Managed.LinqService,False,True,True).sql | 17 ++ ....Managed.LinqService,True,False,False).sql | 17 ++ ...e.Managed.LinqService,True,False,True).sql | 17 ++ ...e.Managed.LinqService,True,True,False).sql | 17 ++ ...se.Managed.LinqService,True,True,True).sql | 17 ++ ...able1Async(Sybase.Managed.LinqService).sql | 35 +++ ...TableAsync(Sybase.Managed.LinqService).sql | 35 +++ ...eNameAsync(Sybase.Managed.LinqService).sql | 90 ++++++++ ...sert2Async(Sybase.Managed.LinqService).sql | 46 ++++ ...sert3Async(Sybase.Managed.LinqService).sql | 48 ++++ ...sert4Async(Sybase.Managed.LinqService).sql | 48 ++++ ...eNameAsync(Sybase.Managed.LinqService).sql | 70 ++++++ ...lace1Async(Sybase.Managed.LinqService).sql | 109 +++++++++ ...eNameAsync(Sybase.Managed.LinqService).sql | 167 ++++++++++++++ ...date3Async(Sybase.Managed.LinqService).sql | 103 +++++++++ ...ate3xAsync(Sybase.Managed.LinqService).sql | 109 +++++++++ ...tity1Async(Sybase.Managed.LinqService).sql | 14 ++ ...tity2Async(Sybase.Managed.LinqService).sql | 14 ++ ...tity4Async(Sybase.Managed.LinqService).sql | 32 +++ ...mQueryAsyn(Sybase.Managed.LinqService).sql | 39 ++++ ...mTableAsyn(Sybase.Managed.LinqService).sql | 37 +++ ...ate12Async(Sybase.Managed.LinqService).sql | 28 +++ ...date1Async(Sybase.Managed.LinqService).sql | 54 +++++ ...date2Async(Sybase.Managed.LinqService).sql | 54 +++++ ...date4Async(Sybase.Managed.LinqService).sql | 55 +++++ ...tion1Async(Sybase.Managed.LinqService).sql | 40 ++++ ...n1AsyncOld(Sybase.Managed.LinqService).sql | 40 ++++ ...eNameAsync(Sybase.Managed.LinqService).sql | 106 +++++++++ ...plex1Async(Sybase.Managed.LinqService).sql | 55 +++++ ...s.Linq.AsyncTests.Test(Sybase.Managed).sql | 18 ++ ....Linq.AsyncTests.Test1(Sybase.Managed).sql | 9 + ...AsyncTests.TestForEach(Sybase.Managed).sql | 9 + 96 files changed, 2937 insertions(+), 1592 deletions(-) create mode 100644 Sybase.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Sybase.Managed.LinqService,False).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Sybase.Managed.LinqService,True).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Sybase.Managed.LinqService,False).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Sybase.Managed.LinqService,True).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Sybase.Managed.LinqService,False).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Sybase.Managed.LinqService,True).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Sybase.Managed.LinqService,False).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Sybase.Managed.LinqService,True).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Sybase.Managed.LinqService,False).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Sybase.Managed.LinqService,True).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Sybase.Managed.LinqService,False).sql create mode 100644 Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Sybase.Managed.LinqService,True).sql create mode 100644 Sybase.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Sybase.Managed.LinqService).sql create mode 100644 Sybase.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Sybase.Managed).sql create mode 100644 Sybase.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Sybase.Managed).sql create mode 100644 Sybase.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Sybase.Managed).sql diff --git a/Sybase.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..6304d18a66a4 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ) + THEN 1 + ELSE 0 + END + diff --git a/Sybase.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..13d385485fbf --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN [Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID] + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..adb9b59656f9 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(Sybase.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..9a8dbecde0bc --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(Sybase.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..adb9b59656f9 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(Sybase.Managed.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..9a8dbecde0bc --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(Sybase.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..0581015d89d2 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(Sybase.Managed.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ) + THEN 1 + ELSE 0 + END + diff --git a/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..693d14f05ed2 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(Sybase.Managed.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 1 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 + diff --git a/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Sybase.Managed.LinqService).sql index 7f1f8816088d..bc5bd9757558 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(Sybase.Managed.LinqService).sql @@ -9,3 +9,14 @@ FROM ORDER BY [t1].[ParentID] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..0326044b0b61 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(Sybase.Managed.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 +DECLARE @p_1 Integer -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer -- Int32 +SET @p_2 = 3 +DECLARE @param Integer -- Int32 +SET @param = 4 + +SELECT TOP 1 + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param + diff --git a/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..cea73dcffd17 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(Sybase.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..cea73dcffd17 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(Sybase.Managed.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..e3fd0794f88f --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(Sybase.Managed.LinqService).sql @@ -0,0 +1,38 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..e3fd0794f88f --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(Sybase.Managed.LinqService).sql @@ -0,0 +1,38 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + THEN 1 + ELSE 0 + END + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..58deb8cc384b --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(Sybase.Managed.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..08e143e3e163 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT TOP 2 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..0526446b095a --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(Sybase.Managed.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..92c3518c8d9f --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(Sybase.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..92c3518c8d9f --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(Sybase.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..5b043911cbd4 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(Sybase.Managed.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..5b043911cbd4 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(Sybase.Managed.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT TOP 1 + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..ebf6be17655b --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(Sybase.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..ebf6be17655b --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(Sybase.Managed.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Sybase.Managed.LinqService).sql index 80ec96d46065..f7ef8ce615c7 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(Sybase.Managed.LinqService).sql @@ -1,165 +1,19 @@ BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NULL) - EXECUTE(' - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p ) - ') - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] + THEN 1 + ELSE 0 + END diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Sybase.Managed.LinqService).sql index 80ec96d46065..57caf9140994 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(Sybase.Managed.LinqService).sql @@ -1,165 +1,12 @@ BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NULL) - EXECUTE(' - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - ') - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Sybase.Managed.LinqService).sql index 80ec96d46065..4be76ccabf1a 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(Sybase.Managed.LinqService).sql @@ -1,165 +1,13 @@ BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NULL) - EXECUTE(' - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - ') - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT TOP 1 + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Sybase.Managed.LinqService).sql index 80ec96d46065..4be76ccabf1a 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(Sybase.Managed.LinqService).sql @@ -1,165 +1,13 @@ BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NULL) - EXECUTE(' - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - ') - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT TOP 1 + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Sybase.Managed.LinqService).sql index 80ec96d46065..57caf9140994 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(Sybase.Managed.LinqService).sql @@ -1,165 +1,12 @@ BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NULL) - EXECUTE(' - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - ') - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Sybase.Managed.LinqService).sql index 80ec96d46065..07eedd90fbc1 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(Sybase.Managed.LinqService).sql @@ -1,165 +1,12 @@ BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NULL) - EXECUTE(' - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - ') - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Sybase.Managed.LinqService).sql index 80ec96d46065..b934a5c5fe92 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(Sybase.Managed.LinqService).sql @@ -1,165 +1,12 @@ BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NULL) - EXECUTE(' - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - ') - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Sybase.Managed.LinqService).sql index 80ec96d46065..113e1dc75bab 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(Sybase.Managed.LinqService).sql @@ -1,165 +1,13 @@ BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NULL) - EXECUTE(' - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - ') - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT TOP 2 + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Sybase.Managed.LinqService).sql index 80ec96d46065..113e1dc75bab 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(Sybase.Managed.LinqService).sql @@ -1,165 +1,13 @@ BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NULL) - EXECUTE(' - CREATE TABLE [AsyncDataTable] - ( - [Id] Int NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY CLUSTERED ([Id]) - ) - ') - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Id Integer -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'AsyncDataTable') IS NOT NULL) - DROP TABLE [AsyncDataTable] +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 2 + +SELECT TOP 2 + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/Sybase.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..1561bc29b47f --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/Sybase.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Sybase.Managed.LinqService).sql index 29225f831ecc..67657e02875b 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(Sybase.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value UniVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Sybase.Managed Sybase SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Value UniVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- Sybase.Managed Sybase @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Value UniVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- Sybase.Managed Sybase @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Value UniVarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- Sybase.Managed Sybase @@ -38,6 +111,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM [ConcurrencyAutoIncrement] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- Sybase.Managed Sybase @@ -48,6 +134,19 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -8 + +DELETE FROM [ConcurrencyAutoIncrement] +FROM + [ConcurrencyAutoIncrement] [obj] +WHERE + [obj].[Id] = @Id AND [obj].[Stamp] = @Stamp + BeforeExecute -- Sybase.Managed Sybase diff --git a/Sybase.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Sybase.Managed.LinqService).sql index 980a874b970d..3f0eb3ce9121 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(Sybase.Managed.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 +DECLARE @Value UniVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- Sybase.Managed Sybase SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Value UniVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- Sybase.Managed Sybase @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Value UniVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- Sybase.Managed Sybase @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM [ConcurrencyFiltered] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 2 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- Sybase.Managed Sybase @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Id Integer -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer -- Int32 +SET @Stamp = -9 + +DELETE FROM [ConcurrencyFiltered] +FROM + [ConcurrencyFiltered] [r] +WHERE + [r].[Id] = 1 AND [r].[Id] = @Id AND [r].[Stamp] = @Stamp + BeforeExecute -- Sybase.Managed Sybase diff --git a/Sybase.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..7a66fdc43144 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..180b84e249ea --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/Sybase.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..20cc376a4ade --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t1].[ParentID] + )) +FROM + [Parent] [t1] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Sybase.Managed.LinqService).sql index 7fa8144b6399..83393aafec45 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(Sybase.Managed.LinqService).sql @@ -1,51 +1,11 @@ BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'DynamicParent') IS NOT NULL) - DROP TABLE [DynamicParent] - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'DynamicParent') IS NULL) - EXECUTE(' - CREATE TABLE [DynamicParent] - ( - [ID] Int IDENTITY NOT NULL, - - CONSTRAINT [PK_DynamicParent] PRIMARY KEY CLUSTERED ([ID]) - ) - ') - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'DynamicChild') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'DynamicChild') IS NULL) - EXECUTE(' - CREATE TABLE [DynamicChild] - ( - [ID] Int IDENTITY NOT NULL, - [ParentID] Int NOT NULL, - - CONSTRAINT [PK_DynamicChild] PRIMARY KEY CLUSTERED ([ID]) - ) - ') - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'DynamicChild') IS NOT NULL) - DROP TABLE [DynamicChild] - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'DynamicParent') IS NOT NULL) - DROP TABLE [DynamicParent] +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/Sybase.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Sybase.Managed.LinqService).sql index 88e8db4acfba..04ce13c43576 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(Sybase.Managed.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP 1 + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- Sybase.Managed Sybase (asynchronously) diff --git a/Sybase.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Sybase.Managed.LinqService).sql index 2a477249b3cc..c3a97279005d 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(Sybase.Managed.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT TOP 1 + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 1 + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 + +BeforeExecute BeginTransaction BeforeExecute -- Sybase.Managed Sybase (asynchronously) diff --git a/Sybase.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..91c0289cbd82 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(Sybase.Managed.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..c0dd21aa85b7 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/Sybase.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..63ec5b72ae28 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = 'F' + diff --git a/Sybase.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..889018981c04 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + 1 + diff --git a/Sybase.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..ef8e8fbf56c4 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(Sybase.Managed.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Sybase.Managed.LinqService,False).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Sybase.Managed.LinqService,False).sql new file mode 100644 index 000000000000..e77a8fb689f3 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Sybase.Managed.LinqService,False).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Sybase.Managed.LinqService,True).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Sybase.Managed.LinqService,True).sql new file mode 100644 index 000000000000..e77a8fb689f3 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(Sybase.Managed.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Sybase.Managed.LinqService,False).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Sybase.Managed.LinqService,False).sql new file mode 100644 index 000000000000..e77a8fb689f3 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Sybase.Managed.LinqService,False).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Sybase.Managed.LinqService,True).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Sybase.Managed.LinqService,True).sql new file mode 100644 index 000000000000..e77a8fb689f3 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(Sybase.Managed.LinqService,True).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 4 + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Sybase.Managed.LinqService).sql index fea9423f1292..170057763918 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(Sybase.Managed.LinqService).sql @@ -1,79 +1,10 @@ BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'TakeSkipClass') IS NOT NULL) - DROP TABLE [TakeSkipClass] - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'TakeSkipClass') IS NULL) - EXECUTE(' - CREATE TABLE [TakeSkipClass] - ( - [Value] VarChar(10) NULL - ) - ') - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- Sybase.Managed Sybase -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- Sybase.Managed Sybase - -IF (OBJECT_ID(N'TakeSkipClass') IS NOT NULL) - DROP TABLE [TakeSkipClass] +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Sybase.Managed.LinqService,False).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Sybase.Managed.LinqService,False).sql index 2bd95a030808..ad2c7789d6ea 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Sybase.Managed.LinqService,False).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Sybase.Managed.LinqService,False).sql @@ -16,3 +16,21 @@ SELECT TOP 3 FROM [Child] [ch] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 2 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Sybase.Managed.LinqService,True).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Sybase.Managed.LinqService,True).sql index 2bd95a030808..ad2c7789d6ea 100644 --- a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Sybase.Managed.LinqService,True).sql +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(Sybase.Managed.LinqService,True).sql @@ -16,3 +16,21 @@ SELECT TOP 3 FROM [Child] [ch] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 2 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Sybase.Managed.LinqService,False).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Sybase.Managed.LinqService,False).sql new file mode 100644 index 000000000000..45c246accbbd --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Sybase.Managed.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 1 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Sybase.Managed.LinqService,True).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Sybase.Managed.LinqService,True).sql new file mode 100644 index 000000000000..45c246accbbd --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(Sybase.Managed.LinqService,True).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 1 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Sybase.Managed.LinqService,False).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Sybase.Managed.LinqService,False).sql new file mode 100644 index 000000000000..b92e5f7d2bb6 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Sybase.Managed.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Sybase.Managed.LinqService,True).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Sybase.Managed.LinqService,True).sql new file mode 100644 index 000000000000..b92e5f7d2bb6 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(Sybase.Managed.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Sybase.Managed.LinqService,False).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Sybase.Managed.LinqService,False).sql new file mode 100644 index 000000000000..6face80d2092 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Sybase.Managed.LinqService,False).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Sybase.Managed.LinqService,True).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Sybase.Managed.LinqService,True).sql new file mode 100644 index 000000000000..6face80d2092 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(Sybase.Managed.LinqService,True).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 3 + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Sybase.Managed.LinqService,False).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Sybase.Managed.LinqService,False).sql new file mode 100644 index 000000000000..57f9701ab911 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Sybase.Managed.LinqService,False).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Sybase.Managed.LinqService,True).sql b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Sybase.Managed.LinqService,True).sql new file mode 100644 index 000000000000..57f9701ab911 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(Sybase.Managed.LinqService,True).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 3 + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,False,False).sql b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,False,False).sql index 17335a461b74..8a3787a848df 100644 --- a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,False,False).sql +++ b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,False,False).sql @@ -4,3 +4,20 @@ IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,False,True).sql b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,False,True).sql index 6839921c523d..e46a66db2dbf 100644 --- a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,False,True).sql +++ b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,False,True).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,True,False).sql b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,True,False).sql index f9686cca3412..abc69104c648 100644 --- a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,True,False).sql +++ b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,True,False).sql @@ -12,3 +12,20 @@ BeforeExecute IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +CREATE TABLE [TestDataCore]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,True,True).sql b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,True,True).sql index c4471128f1d8..2c7adb18e07a 100644 --- a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,True,True).sql +++ b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,False,True,True).sql @@ -20,3 +20,20 @@ BeforeExecute IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +CREATE TABLE [TestDataCore].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,False,False).sql b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,False,False).sql index ef655d116b75..5b0a685b3e63 100644 --- a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,False,False).sql +++ b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,False,False).sql @@ -10,3 +10,20 @@ BeforeExecute IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,False,True).sql b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,False,True).sql index 1a6009fde688..34bdebe730f4 100644 --- a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,False,True).sql +++ b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,False,True).sql @@ -18,3 +18,20 @@ BeforeExecute IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +CREATE TABLE [dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,True,False).sql b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,True,False).sql index ec9fd37139dc..f098905bc6ab 100644 --- a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,True,False).sql +++ b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,True,False).sql @@ -18,3 +18,20 @@ BeforeExecute IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +CREATE TABLE [TestDataCore]..[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,True,True).sql b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,True,True).sql index af336d31b780..12c81b840556 100644 --- a/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,True,True).sql +++ b/Sybase.Managed.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(Sybase.Managed.LinqService,True,True,True).sql @@ -26,3 +26,20 @@ BeforeExecute IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) DROP TABLE [Issue681Table2] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +CREATE TABLE [TestDataCore].[dbo].[Issue681Table2] +( + [ID] Int NOT NULL, + [Value] Int NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'Issue681Table2') IS NOT NULL) + DROP TABLE [Issue681Table2] + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..c9020c257be7 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,35 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'TestTable') IS NOT NULL) + DROP TABLE [TestTable] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] Int IDENTITY NOT NULL, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(255) NULL, + [CreatedOn] DateTime NULL, + + CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID]) +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +DROP TABLE [TestTable] + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Sybase.Managed.LinqService).sql index 0953f25c5afd..09ff01e23d5e 100644 --- a/Sybase.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(Sybase.Managed.LinqService).sql @@ -1,4 +1,33 @@ BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'TempTable') IS NOT NULL) + DROP TABLE [TempTable] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'TempTable') IS NULL) + EXECUTE(' + CREATE TABLE [TempTable] + ( + [ID] Int NOT NULL + ) + ') + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- Sybase.Managed Sybase SELECT @@ -7,3 +36,9 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'TempTable') IS NOT NULL) + DROP TABLE [TempTable] + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..385f60b6b959 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(Sybase.Managed.LinqService).sql @@ -0,0 +1,90 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'xxPerson') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int IDENTITY NOT NULL, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @FirstName UniVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName UniVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName UniVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +DELETE FROM [xxPerson] +FROM + [xxPerson] [t1] +WHERE + [t1].[PersonID] = @ID + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..4e4b11fd0393 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +DELETE FROM [Child] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +DELETE FROM [Child] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..ee74882c855d --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +DELETE FROM [Child] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +DELETE FROM [Child] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..ee74882c855d --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +DELETE FROM [Child] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +DELETE FROM [Child] +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] > 1000 + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Sybase.Managed.LinqService).sql index 7a21167837f3..e74f01d1cf1a 100644 --- a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(Sybase.Managed.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- Sybase.Managed Sybase (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int IDENTITY NOT NULL, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @FirstName UniVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName UniVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName UniVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) DECLARE @FirstName UniVarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName UniVarChar(4) -- String @@ -54,3 +94,33 @@ VALUES SELECT @@IDENTITY +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = 'Steven' AND [p].[LastName] = 'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'xxPerson') IS NOT NULL) + DROP TABLE [xxPerson] + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Sybase.Managed.LinqService).sql index be1412c9e14b..de1d7f4b3de2 100644 --- a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(Sybase.Managed.LinqService).sql @@ -31,3 +31,112 @@ VALUES SELECT @@IDENTITY +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Diagnosis UniVarChar(4) -- String +SET @Diagnosis = 'abc0' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis_1 UniVarChar(4) -- String +SET @Diagnosis_1 = 'abc0' + +UPDATE + [Patient] +SET + [Diagnosis] = @Diagnosis +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis_1 + ) +END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Diagnosis UniVarChar(4) -- String +SET @Diagnosis = 'abc1' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis_1 UniVarChar(4) -- String +SET @Diagnosis_1 = 'abc1' + +UPDATE + [Patient] +SET + [Diagnosis] = @Diagnosis +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis_1 + ) +END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Diagnosis UniVarChar(4) -- String +SET @Diagnosis = 'abc2' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis_1 UniVarChar(4) -- String +SET @Diagnosis_1 = 'abc2' + +UPDATE + [Patient] +SET + [Diagnosis] = @Diagnosis +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis_1 + ) +END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..6c554b55c0c0 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(Sybase.Managed.LinqService).sql @@ -0,0 +1,167 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'xxPatient') IS NOT NULL) + DROP TABLE [xxPatient] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] Int NOT NULL, + [Diagnosis] NVarChar(255) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Diagnosis UniVarChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis_1 UniVarChar(4) -- String +SET @Diagnosis_1 = 'ABC1' + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +FROM + [xxPatient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [xxPatient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis_1 + ) +END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Diagnosis UniVarChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis_1 UniVarChar(4) -- String +SET @Diagnosis_1 = 'ABC2' + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +FROM + [xxPatient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [xxPatient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis_1 + ) +END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Diagnosis UniVarChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis_1 UniVarChar(4) -- String +SET @Diagnosis_1 = 'ABC1' + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +FROM + [xxPatient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [xxPatient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis_1 + ) +END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Diagnosis UniVarChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID Integer -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis_1 UniVarChar(4) -- String +SET @Diagnosis_1 = 'ABC2' + +UPDATE + [xxPatient] +SET + [Diagnosis] = @Diagnosis +FROM + [xxPatient] [t1] +WHERE + [t1].[PersonID] = @PersonID + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [xxPatient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @PersonID, + @Diagnosis_1 + ) +END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'xxPatient') IS NOT NULL) + DROP TABLE [xxPatient] + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Sybase.Managed.LinqService).sql index be1412c9e14b..de365980d6ea 100644 --- a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(Sybase.Managed.LinqService).sql @@ -31,3 +31,106 @@ VALUES SELECT @@IDENTITY +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 0 +DECLARE @id Integer -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + 'abc' + ) +END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 1 +DECLARE @id Integer -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + 'abc' + ) +END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 2 +DECLARE @id Integer -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + 'abc' + ) +END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Sybase.Managed.LinqService).sql index be1412c9e14b..8b38261bfa23 100644 --- a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(Sybase.Managed.LinqService).sql @@ -31,3 +31,112 @@ VALUES SELECT @@IDENTITY +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 0 +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @id Integer -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id2 + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + 'abc' + ) +END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 1 +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @id Integer -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id2 + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + 'abc' + ) +END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @i Integer -- Int32 +SET @i = 2 +DECLARE @id2 Integer -- Int32 +SET @id2 = 5 +DECLARE @id Integer -- Int32 +SET @id = 5 + +UPDATE + [Patient] +SET + [Diagnosis] = CAST(Len([t1].[Diagnosis]) + @i AS NVarChar(11)) +FROM + [Patient] [t1] +WHERE + [t1].[PersonID] = @id2 + +IF @@ROWCOUNT = 0 +BEGIN + INSERT INTO [Patient] + ( + [PersonID], + [Diagnosis] + ) + VALUES + ( + @id, + 'abc' + ) +END + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 2 + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Sybase.Managed.LinqService).sql index 741a163130b8..0ac3c2ce0633 100644 --- a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(Sybase.Managed.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT @@IDENTITY +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' + BeforeExecute -- Sybase.Managed Sybase diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Sybase.Managed.LinqService).sql index 741a163130b8..0ac3c2ce0633 100644 --- a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(Sybase.Managed.LinqService).sql @@ -25,6 +25,20 @@ VALUES SELECT @@IDENTITY +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' + BeforeExecute -- Sybase.Managed Sybase diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Sybase.Managed.LinqService).sql index 60bcd08bf016..3791bd24d6a3 100644 --- a/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(Sybase.Managed.LinqService).sql @@ -35,6 +35,22 @@ VALUES SELECT @@IDENTITY +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p UniVarChar(5) -- String +SET @p = 'John0' + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' + BeforeExecute -- Sybase.Managed Sybase (asynchronously) DECLARE @FirstName UniVarChar(5) -- String @@ -63,6 +79,22 @@ VALUES SELECT @@IDENTITY +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p UniVarChar(5) -- String +SET @p = 'John1' + +SELECT TOP 2 + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' + BeforeExecute -- Sybase.Managed Sybase diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Sybase.Managed.LinqService).sql index d815a1ad7e5a..89928a0740e9 100644 --- a/Sybase.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(Sybase.Managed.LinqService).sql @@ -220,6 +220,45 @@ VALUES @Field4 ) +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] + WHERE + [t1].[Id] = 5 +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) + BeforeExecute -- Sybase.Managed Sybase diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Sybase.Managed.LinqService).sql index d815a1ad7e5a..e4bb94cb6f4c 100644 --- a/Sybase.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(Sybase.Managed.LinqService).sql @@ -220,6 +220,43 @@ VALUES @Field4 ) +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +MERGE INTO [TestMerge1] [Target] +USING ( + SELECT + [t1].[Id] as [source_Id], + [t1].[Field1] as [source_Field1], + [t1].[Field2] as [source_Field2], + [t1].[Field4] as [source_Field4] + FROM + [TestMerge2] [t1] +) [Source] +( + [source_Id], + [source_Field1], + [source_Field2], + [source_Field4] +) +ON ([Target].[Id] = [Source].[source_Id]) + +WHEN NOT MATCHED THEN +INSERT +( + [Id], + [Field1], + [Field2], + [Field4] +) +VALUES +( + [Source].[source_Id], + [Source].[source_Field1], + [Source].[source_Field2], + [Source].[source_Field4] +) + BeforeExecute -- Sybase.Managed Sybase diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..05e026e42507 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +UPDATE + [Parent] +SET + [ParentID] = ( + SELECT + [p2_1].[ParentID] + FROM + [Parent] [p1_1] + INNER JOIN [Parent] [p2_1] ON [p1_1].[ParentID] = [p2_1].[ParentID] + WHERE + [p1_1].[ParentID] < 3 AND [Parent].[ParentID] = [p1_1].[ParentID] AND + ([Parent].[Value1] = [p1_1].[Value1] OR [Parent].[Value1] IS NULL AND [p1_1].[Value1] IS NULL) + ) +WHERE + EXISTS( + SELECT + * + FROM + [Parent] [p1] + INNER JOIN [Parent] [p2] ON [p1].[ParentID] = [p2].[ParentID] + WHERE + [p1].[ParentID] < 3 AND [Parent].[ParentID] = [p1].[ParentID] AND + ([Parent].[Value1] = [p1].[Value1] OR [Parent].[Value1] IS NULL AND [p1].[Value1] IS NULL) + ) + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..78782e035a6b --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..78782e035a6b --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @ParentID Integer -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..e2fa7dfcefdc --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 1001 + +UPDATE + [Child] +SET + [ChildID] = [Child].[ChildID] + 1 +FROM + [Parent] [a_Parent] +WHERE + [Child].[ChildID] = @id AND [a_Parent].[Value1] = 1 AND + [Child].[ParentID] = [a_Parent].[ParentID] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @p Integer -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..013fe1ad8db6 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(Sybase.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +UPDATE + [Parent] +SET + [Value1] = 5 +FROM + [Child] [child_1] +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [Parent].[ParentID] + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..013fe1ad8db6 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(Sybase.Managed.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +UPDATE + [Parent] +SET + [Value1] = 5 +FROM + [Child] [child_1] +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [Parent].[ParentID] + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Sybase.Managed.LinqService).sql new file mode 100644 index 000000000000..28688693ab49 --- /dev/null +++ b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(Sybase.Managed.LinqService).sql @@ -0,0 +1,106 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +IF (OBJECT_ID(N'xxPerson') IS NOT NULL) + DROP TABLE [xxPerson] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] Int IDENTITY NOT NULL, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL, + + CONSTRAINT [PK_xxPerson] PRIMARY KEY CLUSTERED ([PersonID]) +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @FirstName UniVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName UniVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName UniVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @FirstName UniVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName UniVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName UniVarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID Integer -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT TOP 2 + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Sybase.Managed.LinqService).sql b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Sybase.Managed.LinqService).sql index 25561ea29e64..4e954b449210 100644 --- a/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Sybase.Managed.LinqService).sql +++ b/Sybase.Managed.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(Sybase.Managed.LinqService).sql @@ -31,3 +31,58 @@ VALUES SELECT @@IDENTITY +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 1 + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @Gender UniChar(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName UniVarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName UniVarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName UniVarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) +DECLARE @id Integer -- Int32 +SET @id = 5 + +SELECT TOP 1 + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id + diff --git a/Sybase.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Sybase.Managed).sql b/Sybase.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Sybase.Managed).sql new file mode 100644 index 000000000000..b438a8e48d47 --- /dev/null +++ b/Sybase.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(Sybase.Managed).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Sybase.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Sybase.Managed).sql b/Sybase.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Sybase.Managed).sql new file mode 100644 index 000000000000..adb9b59656f9 --- /dev/null +++ b/Sybase.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(Sybase.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/Sybase.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Sybase.Managed).sql b/Sybase.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Sybase.Managed).sql new file mode 100644 index 000000000000..adb9b59656f9 --- /dev/null +++ b/Sybase.Managed/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(Sybase.Managed).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- Sybase.Managed Sybase (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From 741c3b2fb2c62e1a3126359ccff3b7d05f8e4db3 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 16 Feb 2025 21:54:47 +0000 Subject: [PATCH 33/40] [Linux / SAP HANA 2] baselines --- ...ts.All4Async(SapHana.Odbc.LinqService).sql | 18 ++ ...roupBy2Async(SapHana.Odbc.LinqService).sql | 30 +++ ...merable1Test(SapHana.Odbc.LinqService).sql | 9 + ...merable2Test(SapHana.Odbc.LinqService).sql | 11 + ...bleCast1Test(SapHana.Odbc.LinqService).sql | 9 + ...bleCast2Test(SapHana.Odbc.LinqService).sql | 11 + ...insAsyncTest(SapHana.Odbc.LinqService).sql | 18 ++ ...rstAsyncTest(SapHana.Odbc.LinqService).sql | 15 ++ ...TakeSkipTest(SapHana.Odbc.LinqService).sql | 16 ++ ...rstOrDefault(SapHana.Odbc.LinqService).sql | 20 ++ ...kupAsyncTest(SapHana.Odbc.LinqService).sql | 21 ++ ...entAsyncTest(SapHana.Odbc.LinqService).sql | 21 ++ ...AnyTestAsync(SapHana.Odbc.LinqService).sql | 40 ++++ ...nyTestAsync2(SapHana.Odbc.LinqService).sql | 40 ++++ ...hoAsyncdTest(SapHana.Odbc.LinqService).sql | 16 ++ ...edTest3Async(SapHana.Odbc.LinqService).sql | 32 +++ ...insTestAsync(SapHana.Odbc.LinqService).sql | 36 +++ ...untTestAsync(SapHana.Odbc.LinqService).sql | 24 ++ ...ntTestAsync2(SapHana.Odbc.LinqService).sql | 24 ++ ...ntTestAsync1(SapHana.Odbc.LinqService).sql | 28 +++ ...ntTestAsync2(SapHana.Odbc.LinqService).sql | 28 +++ ...MaxTestAsync(SapHana.Odbc.LinqService).sql | 24 ++ ...axTestAsync2(SapHana.Odbc.LinqService).sql | 24 ++ ...edicateAsync(SapHana.Odbc.LinqService).sql | 176 ++------------- ...edicateAsync(SapHana.Odbc.LinqService).sql | 168 +------------- ...edicateAsync(SapHana.Odbc.LinqService).sql | 172 ++------------ ...edicateAsync(SapHana.Odbc.LinqService).sql | 172 ++------------ ...edicateAsync(SapHana.Odbc.LinqService).sql | 168 +------------- ...electorAsync(SapHana.Odbc.LinqService).sql | 168 +------------- ...electorAsync(SapHana.Odbc.LinqService).sql | 168 +------------- ...edicateAsync(SapHana.Odbc.LinqService).sql | 172 ++------------ ...edicateAsync(SapHana.Odbc.LinqService).sql | 172 ++------------ ...Concat1Async(SapHana.Odbc.LinqService).sql | 19 ++ ...crementAsync(SapHana.Odbc.LinqService).sql | 97 ++++++++ ...ilteredAsync(SapHana.Odbc.LinqService).sql | 80 +++++++ ....Count1Async(SapHana.Odbc.LinqService).sql | 8 + ....Count2Async(SapHana.Odbc.LinqService).sql | 10 + ...eryMax1Async(SapHana.Odbc.LinqService).sql | 16 ++ ...ts.Issue4602(SapHana.Odbc.LinqService).sql | 48 +--- ...ue4057_Async(SapHana.Odbc.LinqService).sql | 31 +++ ...tTransaction(SapHana.Odbc.LinqService).sql | 31 +++ ...ressionAsync(SapHana.Odbc.LinqService).sql | 25 ++ ...s.Cast1Async(SapHana.Odbc.LinqService).sql | 11 + ....Test18Async(SapHana.Odbc.LinqService).sql | 14 ++ ...ameter1Async(SapHana.Odbc.LinqService).sql | 7 + ...ssue3132Test(SapHana.Odbc.LinqService).sql | 213 ++++++++++++++++++ ...2Async(SapHana.Odbc.LinqService,False).sql | 16 ++ ...t2Async(SapHana.Odbc.LinqService,True).sql | 16 ++ ...3Async(SapHana.Odbc.LinqService,False).sql | 16 ++ ...t3Async(SapHana.Odbc.LinqService,True).sql | 16 ++ ...leSkip1Async(SapHana.Odbc.LinqService).sql | 83 +------ ...1Async(SapHana.Odbc.LinqService,False).sql | 20 ++ ...e1Async(SapHana.Odbc.LinqService,True).sql | 24 ++ ...2Async(SapHana.Odbc.LinqService,False).sql | 12 + ...e2Async(SapHana.Odbc.LinqService,True).sql | 12 + ...3Async(SapHana.Odbc.LinqService,False).sql | 12 + ...e3Async(SapHana.Odbc.LinqService,True).sql | 14 ++ ...4Async(SapHana.Odbc.LinqService,False).sql | 12 + ...e4Async(SapHana.Odbc.LinqService,True).sql | 14 ++ ...5Async(SapHana.Odbc.LinqService,False).sql | 10 + ...e5Async(SapHana.Odbc.LinqService,True).sql | 12 + ...na.Odbc.LinqService,False,False,False).sql | 16 ++ ...ana.Odbc.LinqService,False,False,True).sql | 16 ++ ...ana.Odbc.LinqService,False,True,False).sql | 16 ++ ...Hana.Odbc.LinqService,False,True,True).sql | 16 ++ ...ana.Odbc.LinqService,True,False,False).sql | 5 + ...Hana.Odbc.LinqService,True,False,True).sql | 16 ++ ...Hana.Odbc.LinqService,True,True,False).sql | 5 + ...pHana.Odbc.LinqService,True,True,True).sql | 16 ++ ...eTable1Async(SapHana.Odbc.LinqService).sql | 34 +++ ...teTableAsync(SapHana.Odbc.LinqService).sql | 30 +++ ...bleNameAsync(SapHana.Odbc.LinqService).sql | 89 ++++++++ ...Insert2Async(SapHana.Odbc.LinqService).sql | 44 ++++ ...Insert3Async(SapHana.Odbc.LinqService).sql | 46 ++++ ...Insert4Async(SapHana.Odbc.LinqService).sql | 46 ++++ ...bleNameAsync(SapHana.Odbc.LinqService).sql | 69 ++++++ ...eplace1Async(SapHana.Odbc.LinqService).sql | 74 ++++++ ...bleNameAsync(SapHana.Odbc.LinqService).sql | 129 +++++++++++ ...Update3Async(SapHana.Odbc.LinqService).sql | 72 ++++++ ...pdate3xAsync(SapHana.Odbc.LinqService).sql | 72 ++++++ ...entity1Async(SapHana.Odbc.LinqService).sql | 15 ++ ...entity2Async(SapHana.Odbc.LinqService).sql | 15 ++ ...entity4Async(SapHana.Odbc.LinqService).sql | 34 +++ ...romQueryAsyn(SapHana.Odbc.LinqService).sql | 33 +++ ...romTableAsyn(SapHana.Odbc.LinqService).sql | 31 +++ ...Update1Async(SapHana.Odbc.LinqService).sql | 54 +++++ ...Update2Async(SapHana.Odbc.LinqService).sql | 54 +++++ ...Update4Async(SapHana.Odbc.LinqService).sql | 63 ++++++ ...iation1Async(SapHana.Odbc.LinqService).sql | 47 ++++ ...ion1AsyncOld(SapHana.Odbc.LinqService).sql | 47 ++++ ...bleNameAsync(SapHana.Odbc.LinqService).sql | 107 +++++++++ ...omplex1Async(SapHana.Odbc.LinqService).sql | 57 +++++ ...sts.Linq.AsyncTests.Test(SapHana.Odbc).sql | 18 ++ ...ts.Linq.AsyncTests.Test1(SapHana.Odbc).sql | 9 + ...q.AsyncTests.TestForEach(SapHana.Odbc).sql | 9 + 95 files changed, 2821 insertions(+), 1533 deletions(-) create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SapHana.Odbc.LinqService,False).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SapHana.Odbc.LinqService,True).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SapHana.Odbc.LinqService,False).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SapHana.Odbc.LinqService,True).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SapHana.Odbc.LinqService,False).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SapHana.Odbc.LinqService,True).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SapHana.Odbc.LinqService,False).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SapHana.Odbc.LinqService,True).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SapHana.Odbc.LinqService,False).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SapHana.Odbc.LinqService,True).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SapHana.Odbc.LinqService,False).sql create mode 100644 SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SapHana.Odbc.LinqService,True).sql create mode 100644 SapHana.Odbc.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SapHana.Odbc.LinqService).sql create mode 100644 SapHana.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SapHana.Odbc).sql create mode 100644 SapHana.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SapHana.Odbc).sql create mode 100644 SapHana.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SapHana.Odbc).sql diff --git a/SapHana.Odbc.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..6cc683b9f5b8 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + CASE + WHEN NOT EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" <= 3 + ) + THEN 1 + ELSE 0 + END +FROM DUMMY + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..6f41ae2f2a2d --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT DISTINCT + "a_Parent1"."ParentID" + FROM + "Child" "t1" + INNER JOIN "Parent" "a_Parent1" ON "t1"."ParentID" = "a_Parent1"."ParentID" + ) "m_1" + INNER JOIN ("Child" "d" + INNER JOIN "Parent" "a_Parent1_1" ON "d"."ParentID" = "a_Parent1_1"."ParentID") + ON "m_1"."ParentID" = "a_Parent1_1"."ParentID" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "a_Parent1"."ParentID" +FROM + "Child" "t1" + INNER JOIN "Parent" "a_Parent1" ON "t1"."ParentID" = "a_Parent1"."ParentID" +GROUP BY + "a_Parent1"."ParentID" + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..68403f5dfab7 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SapHana.Odbc.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..53b41cb6d36a --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SapHana.Odbc.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" > 1 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..68403f5dfab7 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SapHana.Odbc.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..53b41cb6d36a --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SapHana.Odbc.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" > 1 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..8d9479ea9b3d --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SapHana.Odbc.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @ID -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN ? IN ( + SELECT + "t1"."PersonID" + FROM + "Person" "t1" + ) + THEN 1 + ELSE 0 + END +FROM DUMMY + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..c177d09bbc28 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SapHana.Odbc.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."PersonID" = 1 +LIMIT 1 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SapHana.Odbc.LinqService).sql index 9eec035c8f82..4fd9beab0d19 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SapHana.Odbc.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY "t1"."ParentID" LIMIT ? OFFSET ? +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @take -- Int32 +SET @take = 2 +DECLARE @skip -- Int32 +SET @skip = 1 + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" +ORDER BY + "t1"."ParentID" +LIMIT ? OFFSET ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..54ceaacc68b5 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SapHana.Odbc.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 +DECLARE @p -- Int32 +SET @p = 2 +DECLARE @p -- Int32 +SET @p = 3 +DECLARE @param -- Int32 +SET @param = 4 + +SELECT + "o"."ParentID", + "o"."Value1" +FROM + "Parent" "o" +WHERE + "o"."ParentID" IN (?, ?, ?) OR "o"."ParentID" = ? +LIMIT 1 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..25ca99a1d321 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SapHana.Odbc.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +ORDER BY + "t1"."ParentID", + "t1"."ChildID" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..25ca99a1d321 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SapHana.Odbc.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +ORDER BY + "t1"."ParentID", + "t1"."ChildID" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..57f6278e63ba --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SapHana.Odbc.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = ? + ) + THEN 1 + ELSE 0 + END +FROM DUMMY + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = ? + ) + THEN 1 + ELSE 0 + END +FROM DUMMY + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..57f6278e63ba --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SapHana.Odbc.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = ? + ) + THEN 1 + ELSE 0 + END +FROM DUMMY + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = ? + ) + THEN 1 + ELSE 0 + END +FROM DUMMY + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..1ed185c24731 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SapHana.Odbc.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = ? +ORDER BY + "x"."ParentID" DESC +LIMIT 1 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..15a4e0bd751a --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? +LIMIT ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? +LIMIT ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..d5f0e7c8f435 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SapHana.Odbc.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN ? IN ( + SELECT + "c_1"."ParentID" + FROM + "Child" "c_1" + ) + THEN 1 + ELSE 0 + END +FROM DUMMY + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN ? IN ( + SELECT + "c_1"."ParentID" + FROM + "Child" "c_1" + ) + THEN 1 + ELSE 0 + END +FROM DUMMY + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..a298985c43c3 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SapHana.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..a298985c43c3 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SapHana.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..a46315093fa2 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SapHana.Odbc.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? +LIMIT 1 + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? +LIMIT 1 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..a46315093fa2 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SapHana.Odbc.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? +LIMIT 1 + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? +LIMIT 1 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..4061c7aa0cea --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SapHana.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..4061c7aa0cea --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SapHana.Odbc.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SapHana.Odbc.LinqService).sql index ed992c5349f5..6b1a3c4d6ea6 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SapHana.Odbc.LinqService).sql @@ -1,160 +1,20 @@ BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -CREATE COLUMN TABLE "AsyncDataTable" -( - "Id" Integer NOT NULL, - - PRIMARY KEY ("Id") -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + "AsyncDataTable" "c_1" + WHERE + "c_1"."Id" = ? + ) + THEN 1 + ELSE 0 + END +FROM DUMMY diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SapHana.Odbc.LinqService).sql index ed992c5349f5..11a3bf1cfc54 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SapHana.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -CREATE COLUMN TABLE "AsyncDataTable" -( - "Id" Integer NOT NULL, - - PRIMARY KEY ("Id") -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = ? diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SapHana.Odbc.LinqService).sql index ed992c5349f5..1ebf4811fb01 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SapHana.Odbc.LinqService).sql @@ -1,160 +1,16 @@ BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -CREATE COLUMN TABLE "AsyncDataTable" -( - "Id" Integer NOT NULL, - - PRIMARY KEY ("Id") -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + ?, + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = ? +LIMIT 1 diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SapHana.Odbc.LinqService).sql index ed992c5349f5..1ebf4811fb01 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SapHana.Odbc.LinqService).sql @@ -1,160 +1,16 @@ BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -CREATE COLUMN TABLE "AsyncDataTable" -( - "Id" Integer NOT NULL, - - PRIMARY KEY ("Id") -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + ?, + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = ? +LIMIT 1 diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SapHana.Odbc.LinqService).sql index ed992c5349f5..11a3bf1cfc54 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SapHana.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -CREATE COLUMN TABLE "AsyncDataTable" -( - "Id" Integer NOT NULL, - - PRIMARY KEY ("Id") -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = ? diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SapHana.Odbc.LinqService).sql index ed992c5349f5..6a07ba1a76bd 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SapHana.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -CREATE COLUMN TABLE "AsyncDataTable" -( - "Id" Integer NOT NULL, - - PRIMARY KEY ("Id") -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MAX("c_1"."Id") +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" > ? diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SapHana.Odbc.LinqService).sql index ed992c5349f5..8b33b4b0765e 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SapHana.Odbc.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -CREATE COLUMN TABLE "AsyncDataTable" -( - "Id" Integer NOT NULL, - - PRIMARY KEY ("Id") -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MIN("c_1"."Id") +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" > ? diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SapHana.Odbc.LinqService).sql index ed992c5349f5..d44fcdbffd30 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SapHana.Odbc.LinqService).sql @@ -1,160 +1,16 @@ BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -CREATE COLUMN TABLE "AsyncDataTable" -( - "Id" Integer NOT NULL, - - PRIMARY KEY ("Id") -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + ?, + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = ? +LIMIT 2 diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SapHana.Odbc.LinqService).sql index ed992c5349f5..d44fcdbffd30 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SapHana.Odbc.LinqService).sql @@ -1,160 +1,16 @@ BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -CREATE COLUMN TABLE "AsyncDataTable" -( - "Id" Integer NOT NULL, - - PRIMARY KEY ("Id") -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "AsyncDataTable" +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + ?, + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = ? +LIMIT 2 diff --git a/SapHana.Odbc.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..b01c4be53806 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" = 1 +UNION ALL +SELECT + "p_1"."ParentID", + "p_1"."Value1" +FROM + "Parent" "p_1" +WHERE + "p_1"."ParentID" = 2 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SapHana.Odbc.LinqService).sql index 8702b238eb47..754c8ad74e66 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SapHana.Odbc.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + ?, + ?, + ? +) + +BeforeExecute -- SapHana.Odbc SapHanaOdbc SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = ? +WHERE + "obj"."Id" = ? AND "obj"."Stamp" = ? + BeforeExecute -- SapHana.Odbc SapHanaOdbc @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = ? +WHERE + "obj"."Id" = ? AND "obj"."Stamp" = ? + BeforeExecute -- SapHana.Odbc SapHanaOdbc @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = ? +WHERE + "obj"."Id" = ? AND "obj"."Stamp" = ? + BeforeExecute -- SapHana.Odbc SapHanaOdbc @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" "obj" +WHERE + "obj"."Id" = ? AND "obj"."Stamp" = ? + BeforeExecute -- SapHana.Odbc SapHanaOdbc @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" "obj" +WHERE + "obj"."Id" = ? AND "obj"."Stamp" = ? + BeforeExecute -- SapHana.Odbc SapHanaOdbc diff --git a/SapHana.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SapHana.Odbc.LinqService).sql index e82ad3493026..cfc80d7f9a12 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SapHana.Odbc.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + ?, + ?, + ? +) + +BeforeExecute -- SapHana.Odbc SapHanaOdbc SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" "r" +SET + "Stamp" = "r"."Stamp" + 1, + "Value" = ? +WHERE + "r"."Id" = 2 AND "r"."Id" = ? AND "r"."Stamp" = ? + BeforeExecute -- SapHana.Odbc SapHanaOdbc @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" "r" +SET + "Stamp" = "r"."Stamp" + 1, + "Value" = ? +WHERE + "r"."Id" = 1 AND "r"."Id" = ? AND "r"."Stamp" = ? + BeforeExecute -- SapHana.Odbc SapHanaOdbc @@ -28,6 +84,18 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" "r" +WHERE + "r"."Id" = 2 AND "r"."Id" = ? AND "r"."Stamp" = ? + BeforeExecute -- SapHana.Odbc SapHanaOdbc @@ -38,6 +106,18 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" "r" +WHERE + "r"."Id" = 1 AND "r"."Id" = ? AND "r"."Stamp" = ? + BeforeExecute -- SapHana.Odbc SapHanaOdbc diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..ce0fc2e0b85d --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" "t1" + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..1ad3c8659caa --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 2 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..3f1f011a8425 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" "c_1" + LEFT JOIN "Parent" "a_Parent" ON "c_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "a_Parent"."ParentID" = "t1"."ParentID" + )) +FROM + "Parent" "t1" + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SapHana.Odbc.LinqService).sql index 630e0466cdff..0060b6c8df5a 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SapHana.Odbc.LinqService).sql @@ -1,41 +1,11 @@ BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "DynamicParent" - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -CREATE COLUMN TABLE "DynamicParent" -( - "ID" Integer GENERATED BY DEFAULT AS IDENTITY NOT NULL, - - PRIMARY KEY ("ID") -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "DynamicChild" - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -CREATE COLUMN TABLE "DynamicChild" -( - "ID" Integer GENERATED BY DEFAULT AS IDENTITY NOT NULL, - "ParentID" Integer NOT NULL, - - PRIMARY KEY ("ID") -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "DynamicChild" - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "DynamicParent" +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "it"."ID" +FROM + "DynamicParent" "it" + LEFT JOIN "DynamicChild" "a_Child" ON "it"."ID" = "a_Child"."ParentID" +WHERE + "a_Child"."ID" = 123 diff --git a/SapHana.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SapHana.Odbc.LinqService).sql index 51c1df97ed32..176eac3231af 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SapHana.Odbc.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT + "x"."ParentID" + FROM + "Parent" "x" + WHERE + "x"."ParentID" = 3 + LIMIT 1 + ) "m_1" + INNER JOIN "Child" "d" ON "m_1"."ParentID" = "d"."ParentID" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- SapHana.Odbc SapHanaOdbc (asynchronously) diff --git a/SapHana.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SapHana.Odbc.LinqService).sql index bc3495db54a5..e92e4a2430a5 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SapHana.Odbc.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT + "x"."ParentID" + FROM + "Parent" "x" + WHERE + "x"."ParentID" = 3 + LIMIT 1 + ) "m_1" + INNER JOIN "Child" "d" ON "m_1"."ParentID" = "d"."ParentID" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- SapHana.Odbc SapHanaOdbc (asynchronously) diff --git a/SapHana.Odbc.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..5542251ca5e6 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SapHana.Odbc.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" "a_Children" + INNER JOIN "GrandChild" "a_GrandChildren" ON "a_Children"."ParentID" = "a_GrandChildren"."ParentID" AND "a_Children"."ChildID" = "a_GrandChildren"."ChildID" + WHERE + "p"."ParentID" = "a_Children"."ParentID" + ) +FROM + "Parent" "p" + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..1fd7e880a66b --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" +WHERE + "t1"."Value1" = 1 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..53d082bd3753 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT DISTINCT + "p1"."PersonID", + "p1"."Gender", + "p1"."FirstName", + "p1"."LastName" +FROM + "Person" "p1" +WHERE + "p1"."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + "p1"."Gender" = 'F' + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..8eb34016e3a2 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,7 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + 1 +FROM DUMMY + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..31ee8064d6a9 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SapHana.Odbc.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "x"."MiddleName", + COUNT(*) +FROM + "Person" "x" +WHERE + "x"."MiddleName" IS NOT NULL +GROUP BY + "x"."MiddleName" +UNION ALL +SELECT + "x_1"."MiddleName", + COUNT(*) +FROM + "Person" "x_1" +WHERE + "x_1"."MiddleName" IS NOT NULL +GROUP BY + "x_1"."MiddleName" +UNION ALL +SELECT + "x_2"."MiddleName", + COUNT(*) +FROM + "Person" "x_2" +WHERE + "x_2"."MiddleName" IS NOT NULL +GROUP BY + "x_2"."MiddleName" +UNION ALL +SELECT + "x_3"."MiddleName", + COUNT(*) +FROM + "Person" "x_3" +WHERE + "x_3"."MiddleName" IS NOT NULL +GROUP BY + "x_3"."MiddleName" +UNION ALL +SELECT + "x_4"."MiddleName", + COUNT(*) +FROM + "Person" "x_4" +WHERE + "x_4"."MiddleName" IS NOT NULL +GROUP BY + "x_4"."MiddleName" +UNION ALL +SELECT + "x_5"."MiddleName", + COUNT(*) +FROM + "Person" "x_5" +WHERE + "x_5"."MiddleName" IS NOT NULL +GROUP BY + "x_5"."MiddleName" +UNION ALL +SELECT + "x_6"."MiddleName", + COUNT(*) +FROM + "Person" "x_6" +WHERE + "x_6"."MiddleName" IS NOT NULL +GROUP BY + "x_6"."MiddleName" +UNION ALL +SELECT + "x_7"."MiddleName", + COUNT(*) +FROM + "Person" "x_7" +WHERE + "x_7"."MiddleName" IS NOT NULL +GROUP BY + "x_7"."MiddleName" +UNION ALL +SELECT + "x_8"."MiddleName", + COUNT(*) +FROM + "Person" "x_8" +WHERE + "x_8"."MiddleName" IS NOT NULL +GROUP BY + "x_8"."MiddleName" +UNION ALL +SELECT + "x_9"."MiddleName", + COUNT(*) +FROM + "Person" "x_9" +WHERE + "x_9"."MiddleName" IS NOT NULL +GROUP BY + "x_9"."MiddleName" +UNION ALL +SELECT + "x_10"."MiddleName", + COUNT(*) +FROM + "Person" "x_10" +WHERE + "x_10"."MiddleName" IS NOT NULL +GROUP BY + "x_10"."MiddleName" +UNION ALL +SELECT + "x_11"."MiddleName", + COUNT(*) +FROM + "Person" "x_11" +WHERE + "x_11"."MiddleName" IS NOT NULL +GROUP BY + "x_11"."MiddleName" +UNION ALL +SELECT + "x_12"."MiddleName", + COUNT(*) +FROM + "Person" "x_12" +WHERE + "x_12"."MiddleName" IS NOT NULL +GROUP BY + "x_12"."MiddleName" +UNION ALL +SELECT + "x_13"."MiddleName", + COUNT(*) +FROM + "Person" "x_13" +WHERE + "x_13"."MiddleName" IS NOT NULL +GROUP BY + "x_13"."MiddleName" +UNION ALL +SELECT + "x_14"."MiddleName", + COUNT(*) +FROM + "Person" "x_14" +WHERE + "x_14"."MiddleName" IS NOT NULL +GROUP BY + "x_14"."MiddleName" +UNION ALL +SELECT + "x_15"."MiddleName", + COUNT(*) +FROM + "Person" "x_15" +WHERE + "x_15"."MiddleName" IS NOT NULL +GROUP BY + "x_15"."MiddleName" +UNION ALL +SELECT + "x_16"."MiddleName", + COUNT(*) +FROM + "Person" "x_16" +WHERE + "x_16"."MiddleName" IS NOT NULL +GROUP BY + "x_16"."MiddleName" +UNION ALL +SELECT + "x_17"."MiddleName", + COUNT(*) +FROM + "Person" "x_17" +WHERE + "x_17"."MiddleName" IS NOT NULL +GROUP BY + "x_17"."MiddleName" +UNION ALL +SELECT + "x_18"."MiddleName", + COUNT(*) +FROM + "Person" "x_18" +WHERE + "x_18"."MiddleName" IS NOT NULL +GROUP BY + "x_18"."MiddleName" +UNION ALL +SELECT + "x_19"."MiddleName", + COUNT(*) +FROM + "Person" "x_19" +WHERE + "x_19"."MiddleName" IS NOT NULL +GROUP BY + "x_19"."MiddleName" +UNION ALL +SELECT + "x_20"."MiddleName", + COUNT(*) +FROM + "Person" "x_20" +WHERE + "x_20"."MiddleName" IS NOT NULL +GROUP BY + "x_20"."MiddleName" + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SapHana.Odbc.LinqService,False).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SapHana.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..c7466a528a24 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SapHana.Odbc.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +LIMIT 1 OFFSET ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SapHana.Odbc.LinqService,True).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SapHana.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..c7466a528a24 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SapHana.Odbc.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +LIMIT 1 OFFSET ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SapHana.Odbc.LinqService,False).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SapHana.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..c7466a528a24 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SapHana.Odbc.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +LIMIT 1 OFFSET ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SapHana.Odbc.LinqService,True).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SapHana.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..c7466a528a24 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SapHana.Odbc.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +LIMIT 1 OFFSET ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SapHana.Odbc.LinqService).sql index 170f1df93e3b..34e6b9e6a05a 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SapHana.Odbc.LinqService).sql @@ -1,74 +1,13 @@ BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "TakeSkipClass" - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -CREATE COLUMN TABLE "TakeSkipClass" -( - "Value" VarChar(10) NULL -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - ? -) - -BeforeExecute --- SapHana.Odbc SapHanaOdbc - -DROP TABLE "TakeSkipClass" +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @skip -- Int32 +SET @skip = 3 + +SELECT + "t1"."Value" +FROM + "TakeSkipClass" "t1" +ORDER BY + "t1"."Value" +LIMIT 4200000000 OFFSET ? diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SapHana.Odbc.LinqService,False).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SapHana.Odbc.LinqService,False).sql index 16bfded1906a..a47917aa6d2e 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SapHana.Odbc.LinqService,False).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SapHana.Odbc.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" "ch" LIMIT 3 +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +LIMIT 2 + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +LIMIT 3 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SapHana.Odbc.LinqService,True).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SapHana.Odbc.LinqService,True).sql index 4748758ff905..d0012589d871 100644 --- a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SapHana.Odbc.LinqService,True).sql +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SapHana.Odbc.LinqService,True).sql @@ -22,3 +22,27 @@ FROM "Child" "ch" LIMIT ? +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @take -- Int32 +SET @take = 2 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +LIMIT ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +LIMIT ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SapHana.Odbc.LinqService,False).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SapHana.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..1805aeacaa2f --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SapHana.Odbc.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @n -- Int32 +SET @n = 1 + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +LIMIT ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SapHana.Odbc.LinqService,True).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SapHana.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..1805aeacaa2f --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SapHana.Odbc.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @n -- Int32 +SET @n = 1 + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +LIMIT ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SapHana.Odbc.LinqService,False).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SapHana.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..f53e2f397ecb --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SapHana.Odbc.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" > 3 OR "ch"."ChildID" < 4 +LIMIT 3 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SapHana.Odbc.LinqService,True).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SapHana.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..3df541444f00 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SapHana.Odbc.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" > 3 OR "ch"."ChildID" < 4 +LIMIT ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SapHana.Odbc.LinqService,False).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SapHana.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..69be11b56bcf --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SapHana.Odbc.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" >= 0 AND "ch"."ChildID" <= 100 +LIMIT 3 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SapHana.Odbc.LinqService,True).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SapHana.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..b303afd05064 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SapHana.Odbc.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" >= 0 AND "ch"."ChildID" <= 100 +LIMIT ? + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SapHana.Odbc.LinqService,False).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SapHana.Odbc.LinqService,False).sql new file mode 100644 index 000000000000..1be707eb0e08 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SapHana.Odbc.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +LIMIT 3 + diff --git a/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SapHana.Odbc.LinqService,True).sql b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SapHana.Odbc.LinqService,True).sql new file mode 100644 index 000000000000..2103b91392a8 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SapHana.Odbc.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +LIMIT ? + diff --git a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,False,False).sql b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,False,False).sql index 36c10df1bb0f..85496ee64904 100644 --- a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,False,False).sql +++ b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE "Issue681Table2" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +CREATE COLUMN TABLE "Issue681Table2" +( + "ID" Integer NOT NULL, + "Value" Integer NOT NULL, + + PRIMARY KEY ("ID") +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "Issue681Table2" + diff --git a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,False,True).sql b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,False,True).sql index d259ef01e874..e43c40d3383f 100644 --- a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,False,True).sql +++ b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,False,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE "Issue681Table2" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +CREATE COLUMN TABLE "TESTDB"."Issue681Table2" +( + "ID" Integer NOT NULL, + "Value" Integer NOT NULL, + + PRIMARY KEY ("ID") +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "Issue681Table2" + diff --git a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,True,False).sql b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,True,False).sql index 36c10df1bb0f..85496ee64904 100644 --- a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,True,False).sql +++ b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE "Issue681Table2" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +CREATE COLUMN TABLE "Issue681Table2" +( + "ID" Integer NOT NULL, + "Value" Integer NOT NULL, + + PRIMARY KEY ("ID") +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "Issue681Table2" + diff --git a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,True,True).sql b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,True,True).sql index d259ef01e874..e43c40d3383f 100644 --- a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,True,True).sql +++ b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,False,True,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE "Issue681Table2" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +CREATE COLUMN TABLE "TESTDB"."Issue681Table2" +( + "ID" Integer NOT NULL, + "Value" Integer NOT NULL, + + PRIMARY KEY ("ID") +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "Issue681Table2" + diff --git a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,False,False).sql b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,False,False).sql index 36c10df1bb0f..4b93c2500d7e 100644 --- a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,False,False).sql +++ b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,False,False).sql @@ -3,3 +3,8 @@ DROP TABLE "Issue681Table2" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "Issue681Table2" + diff --git a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,False,True).sql b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,False,True).sql index d259ef01e874..d9f5a062bcb9 100644 --- a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,False,True).sql +++ b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,False,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE "Issue681Table2" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +CREATE COLUMN TABLE "LINKED_DB"."TESTDB"."Issue681Table2" +( + "ID" Integer NOT NULL, + "Value" Integer NOT NULL, + + PRIMARY KEY ("ID") +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "Issue681Table2" + diff --git a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,True,False).sql b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,True,False).sql index 36c10df1bb0f..4b93c2500d7e 100644 --- a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,True,False).sql +++ b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,True,False).sql @@ -3,3 +3,8 @@ DROP TABLE "Issue681Table2" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "Issue681Table2" + diff --git a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,True,True).sql b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,True,True).sql index d259ef01e874..d9f5a062bcb9 100644 --- a/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,True,True).sql +++ b/SapHana.Odbc.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SapHana.Odbc.LinqService,True,True,True).sql @@ -12,3 +12,19 @@ BeforeExecute DROP TABLE "Issue681Table2" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +CREATE COLUMN TABLE "LINKED_DB"."TESTDB"."Issue681Table2" +( + "ID" Integer NOT NULL, + "Value" Integer NOT NULL, + + PRIMARY KEY ("ID") +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "Issue681Table2" + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..48b87d76b568 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "TestTable" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +CREATE COLUMN TABLE "TestTable" +( + "ID" Integer GENERATED BY DEFAULT AS IDENTITY NOT NULL, + "Field1" NVarChar(50) NULL, + "Field2" NVarChar(255) NULL, + "CreatedOn" Timestamp NULL, + + PRIMARY KEY ("ID") +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ID", + "t1"."Field1", + "t1"."Field2", + "t1"."CreatedOn" +FROM + "TestTable" "t1" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "TestTable" + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SapHana.Odbc.LinqService).sql index 60b35d7b09c2..5a597f7b36e0 100644 --- a/SapHana.Odbc.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SapHana.Odbc.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "TempTable" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +CREATE COLUMN TABLE "TempTable" +( + "ID" Integer NOT NULL +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +INSERT INTO "TempTable" +( + "ID" +) +SELECT + "p"."ParentID" +FROM + "Parent" "p" + +BeforeExecute -- SapHana.Odbc SapHanaOdbc SELECT @@ -7,3 +32,8 @@ FROM "Parent" "p" INNER JOIN "TempTable" "t" ON "p"."ParentID" = "t"."ID" +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "TempTable" + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..9fbd7bddcff8 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SapHana.Odbc.LinqService).sql @@ -0,0 +1,89 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "xxPerson" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +CREATE COLUMN TABLE "xxPerson" +( + "FirstName" NVarChar(255) NOT NULL, + "PersonID" Integer GENERATED BY DEFAULT AS IDENTITY NOT NULL, + "LastName" NVarChar(255) NOT NULL, + "MiddleName" NVarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + ?, + ?, + ?, + ? +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" "t1" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson" "t1" +LIMIT 2 + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @ID -- Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson" "t1" +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" "t1" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..e59f36e94ad8 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + ? +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..47039a3d4011 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + "c_1"."ParentID", + ? +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = 11 + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..47039a3d4011 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + "c_1"."ParentID", + ? +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = 11 + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SapHana.Odbc.LinqService).sql index c0295201a4f5..0e8d1f2935d9 100644 --- a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SapHana.Odbc.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- SapHana.Odbc SapHanaOdbc (asynchronously) + +CREATE COLUMN TABLE "xxPerson" +( + "FirstName" NVarChar(255) NOT NULL, + "PersonID" Integer GENERATED BY DEFAULT AS IDENTITY NOT NULL, + "LastName" NVarChar(255) NOT NULL, + "MiddleName" NVarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + ?, + ?, + ?, + ? +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) DECLARE @FirstName NVarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName NVarChar(4) -- String @@ -60,3 +100,32 @@ BeforeExecute SELECT CURRENT_IDENTITY_VALUE() FROM DUMMY +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" "t1" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" "p" +WHERE + "p"."FirstName" = 'Steven' AND "p"."LastName" = 'King' AND + "p"."Gender" = 'M' + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "xxPerson" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SapHana.Odbc.LinqService).sql index f87f3fc25097..0b266c1bc6e7 100644 --- a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SapHana.Odbc.LinqService).sql @@ -77,3 +77,77 @@ BeforeExecute SELECT CURRENT_IDENTITY_VALUE() FROM DUMMY +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc0' +DECLARE @PersonID -- Int32 +SET @PersonID = 5 + +UPDATE + "Patient" "t1" +SET + "Diagnosis" = ? +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO "Patient" +( + "PersonID", + "Diagnosis" +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc1' +DECLARE @PersonID -- Int32 +SET @PersonID = 5 + +UPDATE + "Patient" "t1" +SET + "Diagnosis" = ? +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc2' +DECLARE @PersonID -- Int32 +SET @PersonID = 5 + +UPDATE + "Patient" "t1" +SET + "Diagnosis" = ? +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = ? +LIMIT 2 + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..5b74b367e56f --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SapHana.Odbc.LinqService).sql @@ -0,0 +1,129 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "xxPatient" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +CREATE COLUMN TABLE "xxPatient" +( + "PersonID" Integer NOT NULL, + "Diagnosis" NVarChar(255) NULL, + + PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID -- Int32 +SET @PersonID = 1 + +UPDATE + "xxPatient" "t1" +SET + "Diagnosis" = ? +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO "xxPatient" +( + "PersonID", + "Diagnosis" +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID -- Int32 +SET @PersonID = 2 + +UPDATE + "xxPatient" "t1" +SET + "Diagnosis" = ? +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO "xxPatient" +( + "PersonID", + "Diagnosis" +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" "t1" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' +DECLARE @PersonID -- Int32 +SET @PersonID = 1 + +UPDATE + "xxPatient" "t1" +SET + "Diagnosis" = ? +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' +DECLARE @PersonID -- Int32 +SET @PersonID = 2 + +UPDATE + "xxPatient" "t1" +SET + "Diagnosis" = ? +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" "t1" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "xxPatient" + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SapHana.Odbc.LinqService).sql index f87f3fc25097..b497754381a9 100644 --- a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SapHana.Odbc.LinqService).sql @@ -77,3 +77,75 @@ BeforeExecute SELECT CURRENT_IDENTITY_VALUE() FROM DUMMY +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @i -- Int32 +SET @i = 0 +DECLARE @id -- Int32 +SET @id = 5 + +UPDATE + "Patient" "t1" +SET + "Diagnosis" = CAST(Length("t1"."Diagnosis") + ? AS NVarChar(11)) +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +INSERT INTO "Patient" +( + "PersonID", + "Diagnosis" +) +VALUES +( + ?, + 'abc' +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @i -- Int32 +SET @i = 1 +DECLARE @id -- Int32 +SET @id = 5 + +UPDATE + "Patient" "t1" +SET + "Diagnosis" = CAST(Length("t1"."Diagnosis") + ? AS NVarChar(11)) +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @i -- Int32 +SET @i = 2 +DECLARE @id -- Int32 +SET @id = 5 + +UPDATE + "Patient" "t1" +SET + "Diagnosis" = CAST(Length("t1"."Diagnosis") + ? AS NVarChar(11)) +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = ? +LIMIT 2 + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SapHana.Odbc.LinqService).sql index f87f3fc25097..767b3f9dafc6 100644 --- a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SapHana.Odbc.LinqService).sql @@ -77,3 +77,75 @@ BeforeExecute SELECT CURRENT_IDENTITY_VALUE() FROM DUMMY +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @i -- Int32 +SET @i = 0 +DECLARE @id2 -- Int32 +SET @id2 = 5 + +UPDATE + "Patient" "t1" +SET + "Diagnosis" = CAST(Length("t1"."Diagnosis") + ? AS NVarChar(11)) +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +INSERT INTO "Patient" +( + "PersonID", + "Diagnosis" +) +VALUES +( + ?, + 'abc' +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @i -- Int32 +SET @i = 1 +DECLARE @id2 -- Int32 +SET @id2 = 5 + +UPDATE + "Patient" "t1" +SET + "Diagnosis" = CAST(Length("t1"."Diagnosis") + ? AS NVarChar(11)) +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @i -- Int32 +SET @i = 2 +DECLARE @id2 -- Int32 +SET @id2 = 5 + +UPDATE + "Patient" "t1" +SET + "Diagnosis" = CAST(Length("t1"."Diagnosis") + ? AS NVarChar(11)) +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = ? +LIMIT 2 + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SapHana.Odbc.LinqService).sql index 29713b5f8392..eb3a65067543 100644 --- a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SapHana.Odbc.LinqService).sql @@ -27,6 +27,21 @@ BeforeExecute SELECT CURRENT_IDENTITY_VALUE() FROM DUMMY +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = 'John' AND "p"."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- SapHana.Odbc SapHanaOdbc diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SapHana.Odbc.LinqService).sql index 29713b5f8392..eb3a65067543 100644 --- a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SapHana.Odbc.LinqService).sql @@ -27,6 +27,21 @@ BeforeExecute SELECT CURRENT_IDENTITY_VALUE() FROM DUMMY +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = 'John' AND "p"."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- SapHana.Odbc SapHanaOdbc diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SapHana.Odbc.LinqService).sql index 2b8437338ce4..786cb384212f 100644 --- a/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SapHana.Odbc.LinqService).sql @@ -37,6 +37,23 @@ BeforeExecute SELECT CURRENT_IDENTITY_VALUE() FROM DUMMY +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John0' + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = ? AND "p"."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- SapHana.Odbc SapHanaOdbc (asynchronously) DECLARE @FirstName NVarChar(5) -- String @@ -68,6 +85,23 @@ BeforeExecute SELECT CURRENT_IDENTITY_VALUE() FROM DUMMY +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John1' + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = ? AND "p"."LastName" = 'Shepard' +LIMIT 2 + BeforeExecute -- SapHana.Odbc SapHanaOdbc diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SapHana.Odbc.LinqService).sql index a65b63af7acc..49276f473e10 100644 --- a/SapHana.Odbc.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(SapHana.Odbc.LinqService).sql @@ -218,6 +218,39 @@ VALUES ? ) +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" + WHERE + "t1"."Id" = 5 +) "Source" +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- SapHana.Odbc SapHanaOdbc diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SapHana.Odbc.LinqService).sql index a65b63af7acc..9242f444320b 100644 --- a/SapHana.Odbc.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(SapHana.Odbc.LinqService).sql @@ -218,6 +218,37 @@ VALUES ? ) +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" +) "Source" +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- SapHana.Odbc SapHanaOdbc diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..62ba87cc6b58 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" "p" +SET + "ParentID" = "p"."ParentID" + 1 +WHERE + "p"."ParentID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = ? + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..62ba87cc6b58 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + ?, + ? +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" "p" +SET + "ParentID" = "p"."ParentID" + 1 +WHERE + "p"."ParentID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = ? + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..3c93a7ff78c9 --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + ? +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "c_1" + LEFT JOIN "Parent" "a_Parent" ON "c_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "c_1"."ChildID" = ? AND + "a_Parent"."Value1" = 1 AND + "Child"."ParentID" = "c_1"."ParentID" AND + "Child"."ChildID" = "c_1"."ChildID" + ) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = ? + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..aa83194f9c4b --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SapHana.Odbc.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "child_1" + LEFT JOIN "Parent" "a_Parent" ON "child_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "child_1"."ChildID" = 10000 AND "Parent"."ParentID" = "a_Parent"."ParentID" AND + ("Parent"."Value1" = "a_Parent"."Value1" OR "Parent"."Value1" IS NULL AND "a_Parent"."Value1" IS NULL) + ) + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..aa83194f9c4b --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SapHana.Odbc.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "child_1" + LEFT JOIN "Parent" "a_Parent" ON "child_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "child_1"."ChildID" = 10000 AND "Parent"."ParentID" = "a_Parent"."ParentID" AND + ("Parent"."Value1" = "a_Parent"."Value1" OR "Parent"."Value1" IS NULL AND "a_Parent"."Value1" IS NULL) + ) + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SapHana.Odbc.LinqService).sql new file mode 100644 index 000000000000..39344ae6724c --- /dev/null +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SapHana.Odbc.LinqService).sql @@ -0,0 +1,107 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "xxPerson" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +CREATE COLUMN TABLE "xxPerson" +( + "FirstName" NVarChar(255) NOT NULL, + "PersonID" Integer GENERATED BY DEFAULT AS IDENTITY NOT NULL, + "LastName" NVarChar(255) NOT NULL, + "MiddleName" NVarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + ?, + ?, + ?, + ? +) + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" "t1" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson" "t1" +LIMIT 2 + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID -- Int32 +SET @ID = 1 + +UPDATE + "xxPerson" "t1" +SET + "FirstName" = ?, + "LastName" = ?, + "MiddleName" = ?, + "Gender" = ? +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson" "t1" +LIMIT 2 + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SapHana.Odbc.LinqService).sql b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SapHana.Odbc.LinqService).sql index 078c6ecc5303..849628f806c0 100644 --- a/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SapHana.Odbc.LinqService).sql +++ b/SapHana.Odbc.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SapHana.Odbc.LinqService).sql @@ -77,3 +77,60 @@ BeforeExecute SELECT CURRENT_IDENTITY_VALUE() FROM DUMMY +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + "t1"."PersonID", + "t1"."Gender", + "t1"."FirstName", + "t1"."MiddleName", + "t1"."LastName" +FROM + "Person" "t1" +WHERE + "t1"."PersonID" = ? +LIMIT 1 + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName NVarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName NVarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID -- Int32 +SET @ID = 5 + +UPDATE + "Person" "t1" +SET + "Gender" = ?, + "FirstName" = ?, + "MiddleName" = ?, + "LastName" = ? +WHERE + "t1"."PersonID" = ? + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + "t1"."PersonID", + "t1"."Gender", + "t1"."FirstName", + "t1"."MiddleName", + "t1"."LastName" +FROM + "Person" "t1" +WHERE + "t1"."PersonID" = ? +LIMIT 1 + diff --git a/SapHana.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SapHana.Odbc).sql b/SapHana.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SapHana.Odbc).sql new file mode 100644 index 000000000000..731dbf3230e1 --- /dev/null +++ b/SapHana.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SapHana.Odbc).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/SapHana.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SapHana.Odbc).sql b/SapHana.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SapHana.Odbc).sql new file mode 100644 index 000000000000..68403f5dfab7 --- /dev/null +++ b/SapHana.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SapHana.Odbc).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/SapHana.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SapHana.Odbc).sql b/SapHana.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SapHana.Odbc).sql new file mode 100644 index 000000000000..68403f5dfab7 --- /dev/null +++ b/SapHana.Odbc/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SapHana.Odbc).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SapHana.Odbc SapHanaOdbc (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + From 1bfff9839e848f8b7af8d86afe7e492d925cc455 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Thu, 20 Feb 2025 07:04:25 +0000 Subject: [PATCH 34/40] [Windows / SQLite (specialized tests)] baselines --- ..._Async(SQLite.Classic.MPM.LinqService).sql | 12 + ...4Async(SQLite.Classic.MPM.LinqService).sql | 13 + ...2Async(SQLite.Classic.MPM.LinqService).sql | 30 ++ ...e1Test(SQLite.Classic.MPM.LinqService).sql | 9 + ...e2Test(SQLite.Classic.MPM.LinqService).sql | 11 + ...t1Test(SQLite.Classic.MPM.LinqService).sql | 9 + ...t2Test(SQLite.Classic.MPM.LinqService).sql | 11 + ...ncTest(SQLite.Classic.MPM.LinqService).sql | 17 + ...ncTest(SQLite.Classic.MPM.LinqService).sql | 15 + ...ipTest(SQLite.Classic.MPM.LinqService).sql | 16 + ...efault(SQLite.Classic.MPM.LinqService).sql | 20 + ...ncTest(SQLite.Classic.MPM.LinqService).sql | 21 + ...ncTest(SQLite.Classic.MPM.LinqService).sql | 21 + ...tAsync(SQLite.Classic.MPM.LinqService).sql | 30 ++ ...Async2(SQLite.Classic.MPM.LinqService).sql | 30 ++ ...cdTest(SQLite.Classic.MPM.LinqService).sql | 16 + ...3Async(SQLite.Classic.MPM.LinqService).sql | 28 ++ ...tAsync(SQLite.Classic.MPM.LinqService).sql | 34 ++ ...tAsync(SQLite.Classic.MPM.LinqService).sql | 24 + ...Async2(SQLite.Classic.MPM.LinqService).sql | 24 + ...Async1(SQLite.Classic.MPM.LinqService).sql | 28 ++ ...Async2(SQLite.Classic.MPM.LinqService).sql | 28 ++ ...tAsync(SQLite.Classic.MPM.LinqService).sql | 24 + ...Async2(SQLite.Classic.MPM.LinqService).sql | 24 + ...lAsync(SQLite.Classic.MPM.LinqService).sql | 171 +------ ...yAsync(SQLite.Classic.MPM.LinqService).sql | 171 +------ ...eAsync(SQLite.Classic.MPM.LinqService).sql | 171 +------ ...ncLong(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...sAsync(SQLite.Classic.MPM.LinqService).sql | 173 +------ ...tAsync(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...eAsync(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...tAsync(SQLite.Classic.MPM.LinqService).sql | 170 +------ ...tAsync(SQLite.Classic.MPM.LinqService).sql | 170 +------ ...eAsync(SQLite.Classic.MPM.LinqService).sql | 170 +------ ...eAsync(SQLite.Classic.MPM.LinqService).sql | 170 +------ ...tAsync(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...eAsync(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...xAsync(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...rAsync(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...nAsync(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...rAsync(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...eAsync(SQLite.Classic.MPM.LinqService).sql | 170 +------ ...tAsync(SQLite.Classic.MPM.LinqService).sql | 170 +------ ...eAsync(SQLite.Classic.MPM.LinqService).sql | 170 +------ ...eAsync(SQLite.Classic.MPM.LinqService).sql | 170 +------ ...ecimal(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...cimalN(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...Double(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...oubleN(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...cFloat(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...FloatN(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...yncInt(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...ncIntN(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...ncLong(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...cLongN(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...ecimal(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...cimalN(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...Double(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...oubleN(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...rFloat(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...FloatN(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...torInt(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...orIntN(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...orLong(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...rLongN(SQLite.Classic.MPM.LinqService).sql | 168 +------ ...1Async(SQLite.Classic.MPM.LinqService).sql | 19 + ...tAsync(SQLite.Classic.MPM.LinqService).sql | 97 ++++ ...dAsync(SQLite.Classic.MPM.LinqService).sql | 84 ++++ ...1Async(SQLite.Classic.MPM.LinqService).sql | 8 + ...2Async(SQLite.Classic.MPM.LinqService).sql | 10 + ...1Async(SQLite.Classic.MPM.LinqService).sql | 16 + ...ue4602(SQLite.Classic.MPM.LinqService).sql | 44 +- ..._Async(SQLite.Classic.MPM.LinqService).sql | 31 ++ ...action(SQLite.Classic.MPM.LinqService).sql | 31 ++ ...nAsync(SQLite.Classic.MPM.LinqService).sql | 25 + ...1Async(SQLite.Classic.MPM.LinqService).sql | 11 + ...8Async(SQLite.Classic.MPM.LinqService).sql | 14 + ...1Async(SQLite.Classic.MPM.LinqService).sql | 6 + ...32Test(SQLite.Classic.MPM.LinqService).sql | 213 +++++++++ ...(SQLite.Classic.MPM.LinqService,False).sql | 16 + ...c(SQLite.Classic.MPM.LinqService,True).sql | 16 + ...(SQLite.Classic.MPM.LinqService,False).sql | 16 + ...c(SQLite.Classic.MPM.LinqService,True).sql | 16 + ...1Async(SQLite.Classic.MPM.LinqService).sql | 80 +--- ...(SQLite.Classic.MPM.LinqService,False).sql | 20 + ...c(SQLite.Classic.MPM.LinqService,True).sql | 24 + ...(SQLite.Classic.MPM.LinqService,False).sql | 12 + ...c(SQLite.Classic.MPM.LinqService,True).sql | 12 + ...(SQLite.Classic.MPM.LinqService,False).sql | 12 + ...c(SQLite.Classic.MPM.LinqService,True).sql | 14 + ...(SQLite.Classic.MPM.LinqService,False).sql | 12 + ...c(SQLite.Classic.MPM.LinqService,True).sql | 14 + ...(SQLite.Classic.MPM.LinqService,False).sql | 10 + ...c(SQLite.Classic.MPM.LinqService,True).sql | 12 + ...thNull(SQLite.Classic.MPM.LinqService).sql | 51 +- ...sic.MPM.LinqService,False,False,False).sql | 16 + ...ssic.MPM.LinqService,False,False,True).sql | 16 + ...ssic.MPM.LinqService,False,True,False).sql | 16 + ...assic.MPM.LinqService,False,True,True).sql | 16 + ...ssic.MPM.LinqService,True,False,False).sql | 16 + ...assic.MPM.LinqService,True,False,True).sql | 16 + ...assic.MPM.LinqService,True,True,False).sql | 16 + ...lassic.MPM.LinqService,True,True,True).sql | 16 + ...1Async(SQLite.Classic.MPM.LinqService).sql | 32 ++ ...eAsync(SQLite.Classic.MPM.LinqService).sql | 30 ++ ...eAsync(SQLite.Classic.MPM.LinqService).sql | 87 ++++ ...st(SQLite.Classic.MPM.LinqService,100).sql | 17 + ...st(SQLite.Classic.MPM.LinqService,200).sql | 17 + ...rd(SQLite.Classic.MPM.LinqService,100).sql | 12 + ...rd(SQLite.Classic.MPM.LinqService,200).sql | 12 + ...st(SQLite.Classic.MPM.LinqService,100).sql | 14 + ...st(SQLite.Classic.MPM.LinqService,200).sql | 14 + ...rd(SQLite.Classic.MPM.LinqService,100).sql | 14 + ...rd(SQLite.Classic.MPM.LinqService,200).sql | 14 + ...st(SQLite.Classic.MPM.LinqService,100).sql | 11 + ...st(SQLite.Classic.MPM.LinqService,200).sql | 11 + ...rd(SQLite.Classic.MPM.LinqService,100).sql | 11 + ...rd(SQLite.Classic.MPM.LinqService,200).sql | 11 + ...2Async(SQLite.Classic.MPM.LinqService).sql | 44 ++ ...3Async(SQLite.Classic.MPM.LinqService).sql | 46 ++ ...4Async(SQLite.Classic.MPM.LinqService).sql | 46 ++ ...eAsync(SQLite.Classic.MPM.LinqService).sql | 67 +++ ...1Async(SQLite.Classic.MPM.LinqService).sql | 74 +++ ...eAsync(SQLite.Classic.MPM.LinqService).sql | 117 +++++ ...3Async(SQLite.Classic.MPM.LinqService).sql | 74 +++ ...xAsync(SQLite.Classic.MPM.LinqService).sql | 74 +++ ...1Async(SQLite.Classic.MPM.LinqService).sql | 15 + ...2Async(SQLite.Classic.MPM.LinqService).sql | 15 + ...4Async(SQLite.Classic.MPM.LinqService).sql | 34 ++ ...Test(SQLite.Classic.MPM.LinqService,1).sql | 36 +- ...Test(SQLite.Classic.MPM.LinqService,2).sql | 36 +- ...Test(SQLite.Classic.MPM.LinqService,1).sql | 36 +- ...Test(SQLite.Classic.MPM.LinqService,2).sql | 36 +- ...nc(SQLite.Classic.MPM.LinqService,100).sql | 24 + ...nc(SQLite.Classic.MPM.LinqService,200).sql | 24 + ...rd(SQLite.Classic.MPM.LinqService,100).sql | 24 + ...rd(SQLite.Classic.MPM.LinqService,200).sql | 24 + ...Test(SQLite.Classic.MPM.LinqService,1).sql | 36 +- ...Test(SQLite.Classic.MPM.LinqService,2).sql | 36 +- ...Test(SQLite.Classic.MPM.LinqService,1).sql | 36 +- ...Test(SQLite.Classic.MPM.LinqService,2).sql | 36 +- ...2Async(SQLite.Classic.MPM.LinqService).sql | 12 + ...1Async(SQLite.Classic.MPM.LinqService).sql | 54 +++ ...2Async(SQLite.Classic.MPM.LinqService).sql | 54 +++ ...4Async(SQLite.Classic.MPM.LinqService).sql | 55 +++ ...1Async(SQLite.Classic.MPM.LinqService).sql | 40 ++ ...yncOld(SQLite.Classic.MPM.LinqService).sql | 40 ++ ...eAsync(SQLite.Classic.MPM.LinqService).sql | 105 ++++ ...1Async(SQLite.Classic.MPM.LinqService).sql | 57 +++ ...Update(SQLite.Classic.MPM.LinqService).sql | 448 +----------------- ...Record(SQLite.Classic.MPM.LinqService).sql | 448 +----------------- ...Update(SQLite.Classic.MPM.LinqService).sql | 448 +----------------- ...Record(SQLite.Classic.MPM.LinqService).sql | 448 +----------------- ...outOld(SQLite.Classic.MPM.LinqService).sql | 227 +-------- ...Record(SQLite.Classic.MPM.LinqService).sql | 227 +-------- ...outOld(SQLite.Classic.MPM.LinqService).sql | 228 +-------- ...Record(SQLite.Classic.MPM.LinqService).sql | 228 +-------- ...nq.AsyncTests.Test(SQLite.Classic.MPM).sql | 18 + ...q.AsyncTests.Test1(SQLite.Classic.MPM).sql | 9 + ...cTests.TestForEach(SQLite.Classic.MPM).sql | 9 + ..._Async(SQLite.Classic.MPU.LinqService).sql | 12 + ...4Async(SQLite.Classic.MPU.LinqService).sql | 13 + ...2Async(SQLite.Classic.MPU.LinqService).sql | 30 ++ ...e1Test(SQLite.Classic.MPU.LinqService).sql | 9 + ...e2Test(SQLite.Classic.MPU.LinqService).sql | 11 + ...t1Test(SQLite.Classic.MPU.LinqService).sql | 9 + ...t2Test(SQLite.Classic.MPU.LinqService).sql | 11 + ...ncTest(SQLite.Classic.MPU.LinqService).sql | 17 + ...ncTest(SQLite.Classic.MPU.LinqService).sql | 15 + ...ipTest(SQLite.Classic.MPU.LinqService).sql | 16 + ...efault(SQLite.Classic.MPU.LinqService).sql | 20 + ...ncTest(SQLite.Classic.MPU.LinqService).sql | 21 + ...ncTest(SQLite.Classic.MPU.LinqService).sql | 21 + ...tAsync(SQLite.Classic.MPU.LinqService).sql | 30 ++ ...Async2(SQLite.Classic.MPU.LinqService).sql | 30 ++ ...cdTest(SQLite.Classic.MPU.LinqService).sql | 16 + ...3Async(SQLite.Classic.MPU.LinqService).sql | 28 ++ ...tAsync(SQLite.Classic.MPU.LinqService).sql | 34 ++ ...tAsync(SQLite.Classic.MPU.LinqService).sql | 24 + ...Async2(SQLite.Classic.MPU.LinqService).sql | 24 + ...Async1(SQLite.Classic.MPU.LinqService).sql | 28 ++ ...Async2(SQLite.Classic.MPU.LinqService).sql | 28 ++ ...tAsync(SQLite.Classic.MPU.LinqService).sql | 24 + ...Async2(SQLite.Classic.MPU.LinqService).sql | 24 + ...lAsync(SQLite.Classic.MPU.LinqService).sql | 171 +------ ...yAsync(SQLite.Classic.MPU.LinqService).sql | 171 +------ ...eAsync(SQLite.Classic.MPU.LinqService).sql | 171 +------ ...ncLong(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...sAsync(SQLite.Classic.MPU.LinqService).sql | 173 +------ ...tAsync(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...eAsync(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...tAsync(SQLite.Classic.MPU.LinqService).sql | 170 +------ ...tAsync(SQLite.Classic.MPU.LinqService).sql | 170 +------ ...eAsync(SQLite.Classic.MPU.LinqService).sql | 170 +------ ...eAsync(SQLite.Classic.MPU.LinqService).sql | 170 +------ ...tAsync(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...eAsync(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...xAsync(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...rAsync(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...nAsync(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...rAsync(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...eAsync(SQLite.Classic.MPU.LinqService).sql | 170 +------ ...tAsync(SQLite.Classic.MPU.LinqService).sql | 170 +------ ...eAsync(SQLite.Classic.MPU.LinqService).sql | 170 +------ ...eAsync(SQLite.Classic.MPU.LinqService).sql | 170 +------ ...ecimal(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...cimalN(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...Double(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...oubleN(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...cFloat(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...FloatN(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...yncInt(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...ncIntN(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...ncLong(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...cLongN(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...ecimal(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...cimalN(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...Double(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...oubleN(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...rFloat(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...FloatN(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...torInt(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...orIntN(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...orLong(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...rLongN(SQLite.Classic.MPU.LinqService).sql | 168 +------ ...1Async(SQLite.Classic.MPU.LinqService).sql | 19 + ...tAsync(SQLite.Classic.MPU.LinqService).sql | 97 ++++ ...dAsync(SQLite.Classic.MPU.LinqService).sql | 84 ++++ ...1Async(SQLite.Classic.MPU.LinqService).sql | 8 + ...2Async(SQLite.Classic.MPU.LinqService).sql | 10 + ...1Async(SQLite.Classic.MPU.LinqService).sql | 16 + ...ue4602(SQLite.Classic.MPU.LinqService).sql | 44 +- ..._Async(SQLite.Classic.MPU.LinqService).sql | 31 ++ ...action(SQLite.Classic.MPU.LinqService).sql | 31 ++ ...nAsync(SQLite.Classic.MPU.LinqService).sql | 25 + ...1Async(SQLite.Classic.MPU.LinqService).sql | 11 + ...8Async(SQLite.Classic.MPU.LinqService).sql | 14 + ...1Async(SQLite.Classic.MPU.LinqService).sql | 6 + ...32Test(SQLite.Classic.MPU.LinqService).sql | 213 +++++++++ ...(SQLite.Classic.MPU.LinqService,False).sql | 16 + ...c(SQLite.Classic.MPU.LinqService,True).sql | 16 + ...(SQLite.Classic.MPU.LinqService,False).sql | 16 + ...c(SQLite.Classic.MPU.LinqService,True).sql | 16 + ...1Async(SQLite.Classic.MPU.LinqService).sql | 80 +--- ...(SQLite.Classic.MPU.LinqService,False).sql | 20 + ...c(SQLite.Classic.MPU.LinqService,True).sql | 24 + ...(SQLite.Classic.MPU.LinqService,False).sql | 12 + ...c(SQLite.Classic.MPU.LinqService,True).sql | 12 + ...(SQLite.Classic.MPU.LinqService,False).sql | 12 + ...c(SQLite.Classic.MPU.LinqService,True).sql | 14 + ...(SQLite.Classic.MPU.LinqService,False).sql | 12 + ...c(SQLite.Classic.MPU.LinqService,True).sql | 14 + ...(SQLite.Classic.MPU.LinqService,False).sql | 10 + ...c(SQLite.Classic.MPU.LinqService,True).sql | 12 + ...thNull(SQLite.Classic.MPU.LinqService).sql | 51 +- ...sic.MPU.LinqService,False,False,False).sql | 16 + ...ssic.MPU.LinqService,False,False,True).sql | 16 + ...ssic.MPU.LinqService,False,True,False).sql | 16 + ...assic.MPU.LinqService,False,True,True).sql | 16 + ...ssic.MPU.LinqService,True,False,False).sql | 16 + ...assic.MPU.LinqService,True,False,True).sql | 16 + ...assic.MPU.LinqService,True,True,False).sql | 16 + ...lassic.MPU.LinqService,True,True,True).sql | 16 + ...1Async(SQLite.Classic.MPU.LinqService).sql | 32 ++ ...eAsync(SQLite.Classic.MPU.LinqService).sql | 30 ++ ...eAsync(SQLite.Classic.MPU.LinqService).sql | 87 ++++ ...st(SQLite.Classic.MPU.LinqService,100).sql | 17 + ...st(SQLite.Classic.MPU.LinqService,200).sql | 17 + ...rd(SQLite.Classic.MPU.LinqService,100).sql | 12 + ...rd(SQLite.Classic.MPU.LinqService,200).sql | 12 + ...st(SQLite.Classic.MPU.LinqService,100).sql | 14 + ...st(SQLite.Classic.MPU.LinqService,200).sql | 14 + ...rd(SQLite.Classic.MPU.LinqService,100).sql | 14 + ...rd(SQLite.Classic.MPU.LinqService,200).sql | 14 + ...st(SQLite.Classic.MPU.LinqService,100).sql | 11 + ...st(SQLite.Classic.MPU.LinqService,200).sql | 11 + ...rd(SQLite.Classic.MPU.LinqService,100).sql | 11 + ...rd(SQLite.Classic.MPU.LinqService,200).sql | 11 + ...2Async(SQLite.Classic.MPU.LinqService).sql | 44 ++ ...3Async(SQLite.Classic.MPU.LinqService).sql | 46 ++ ...4Async(SQLite.Classic.MPU.LinqService).sql | 46 ++ ...eAsync(SQLite.Classic.MPU.LinqService).sql | 67 +++ ...1Async(SQLite.Classic.MPU.LinqService).sql | 74 +++ ...eAsync(SQLite.Classic.MPU.LinqService).sql | 117 +++++ ...3Async(SQLite.Classic.MPU.LinqService).sql | 74 +++ ...xAsync(SQLite.Classic.MPU.LinqService).sql | 74 +++ ...1Async(SQLite.Classic.MPU.LinqService).sql | 15 + ...2Async(SQLite.Classic.MPU.LinqService).sql | 15 + ...4Async(SQLite.Classic.MPU.LinqService).sql | 34 ++ ...Test(SQLite.Classic.MPU.LinqService,1).sql | 36 +- ...Test(SQLite.Classic.MPU.LinqService,2).sql | 36 +- ...Test(SQLite.Classic.MPU.LinqService,1).sql | 36 +- ...Test(SQLite.Classic.MPU.LinqService,2).sql | 36 +- ...nc(SQLite.Classic.MPU.LinqService,100).sql | 24 + ...nc(SQLite.Classic.MPU.LinqService,200).sql | 24 + ...rd(SQLite.Classic.MPU.LinqService,100).sql | 24 + ...rd(SQLite.Classic.MPU.LinqService,200).sql | 24 + ...Test(SQLite.Classic.MPU.LinqService,1).sql | 36 +- ...Test(SQLite.Classic.MPU.LinqService,2).sql | 36 +- ...Test(SQLite.Classic.MPU.LinqService,1).sql | 36 +- ...Test(SQLite.Classic.MPU.LinqService,2).sql | 36 +- ...2Async(SQLite.Classic.MPU.LinqService).sql | 12 + ...1Async(SQLite.Classic.MPU.LinqService).sql | 54 +++ ...2Async(SQLite.Classic.MPU.LinqService).sql | 54 +++ ...4Async(SQLite.Classic.MPU.LinqService).sql | 55 +++ ...1Async(SQLite.Classic.MPU.LinqService).sql | 40 ++ ...yncOld(SQLite.Classic.MPU.LinqService).sql | 40 ++ ...eAsync(SQLite.Classic.MPU.LinqService).sql | 105 ++++ ...1Async(SQLite.Classic.MPU.LinqService).sql | 57 +++ ...Update(SQLite.Classic.MPU.LinqService).sql | 448 +----------------- ...Record(SQLite.Classic.MPU.LinqService).sql | 448 +----------------- ...Update(SQLite.Classic.MPU.LinqService).sql | 448 +----------------- ...Record(SQLite.Classic.MPU.LinqService).sql | 448 +----------------- ...outOld(SQLite.Classic.MPU.LinqService).sql | 227 +-------- ...Record(SQLite.Classic.MPU.LinqService).sql | 227 +-------- ...outOld(SQLite.Classic.MPU.LinqService).sql | 228 +-------- ...Record(SQLite.Classic.MPU.LinqService).sql | 228 +-------- ...nq.AsyncTests.Test(SQLite.Classic.MPU).sql | 18 + ...q.AsyncTests.Test1(SQLite.Classic.MPU).sql | 9 + ...cTests.TestForEach(SQLite.Classic.MPU).sql | 9 + 320 files changed, 7248 insertions(+), 18630 deletions(-) create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPM.LinqService,False).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPM.LinqService,True).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPM.LinqService,False).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPM.LinqService,True).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPM.LinqService,False).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPM.LinqService,True).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPM.LinqService,False).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPM.LinqService,True).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPM.LinqService,False).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPM.LinqService,True).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPM.LinqService,False).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPM.LinqService,True).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.Classic.MPM.LinqService).sql create mode 100644 SQLite.Classic.MPM/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.Classic.MPM).sql create mode 100644 SQLite.Classic.MPM/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.Classic.MPM).sql create mode 100644 SQLite.Classic.MPM/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.Classic.MPM).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPU.LinqService,False).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPU.LinqService,True).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPU.LinqService,False).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPU.LinqService,True).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPU.LinqService,False).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPU.LinqService,True).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPU.LinqService,False).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPU.LinqService,True).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPU.LinqService,False).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPU.LinqService,True).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPU.LinqService,False).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPU.LinqService,True).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.Classic.MPU.LinqService).sql create mode 100644 SQLite.Classic.MPU/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.Classic.MPU).sql create mode 100644 SQLite.Classic.MPU/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.Classic.MPU).sql create mode 100644 SQLite.Classic.MPU/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.Classic.MPU).sql diff --git a/SQLite.Classic.MPM.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..de592839e8e9 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [Person] [t1] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..d225df0e72db --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ) + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..af3dfe94dc40 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN ([Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID]) + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..dbade198d173 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..3e0cd369b9dc --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..dbade198d173 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..3e0cd369b9dc --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..66746789e4df --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @ID -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..306c218bbaaf --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 +LIMIT 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.Classic.MPM.LinqService).sql index 3e215f2bad9e..75a3c6030c44 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.Classic.MPM.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] LIMIT @take OFFSET @skip +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 2 +DECLARE @skip -- Int32 +SET @skip = 1 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +LIMIT @take OFFSET @skip + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..b00a7b0fe643 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 +DECLARE @p_1 -- Int32 +SET @p_1 = 2 +DECLARE @p_2 -- Int32 +SET @p_2 = 3 +DECLARE @param -- Int32 +SET @param = 4 + +SELECT + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param +LIMIT 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..ccee33484349 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..ccee33484349 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..3f5a1b1b7f54 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..3f5a1b1b7f54 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..6f54683bed4a --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC +LIMIT 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..2e0198a16b24 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT @p + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT @p + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..fa7d369dc3c9 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..5ba288ac5606 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..5ba288ac5606 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..408a43ba0bef --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..408a43ba0bef --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..1af3b03216f2 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..1af3b03216f2 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..0524e2434270 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + NOT EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] <> @p + ) diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..a197bd8c8b87 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ) diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..a197bd8c8b87 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ) diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..4b8189576e65 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + AVG(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..a7ad92653d28 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,17 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[Id] + FROM + [AsyncDataTable] [c_1] + ) + THEN 1 + ELSE 0 + END diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..f89d1cc1a213 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..f89d1cc1a213 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..4486a36bf3a3 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..4486a36bf3a3 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..4486a36bf3a3 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..4486a36bf3a3 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..f89d1cc1a213 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..f89d1cc1a213 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..ef8fd20740ff 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..ef8fd20740ff 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..c7faa949a249 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..c7faa949a249 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..fe73408860d6 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..fe73408860d6 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..fe73408860d6 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..fe73408860d6 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..cd5c29b3dd12 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..cd5c29b3dd12 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..0f95d4d667fa 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..0f95d4d667fa 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..a1dd05867aca 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..a1dd05867aca 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..4f17c896b4af 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..4f17c896b4af 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..714593d5d231 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..714593d5d231 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..cd5c29b3dd12 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..cd5c29b3dd12 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..0f95d4d667fa 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..0f95d4d667fa 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..a1dd05867aca 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..a1dd05867aca 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..4f17c896b4af 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..4f17c896b4af 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..714593d5d231 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.Classic.MPM.LinqService).sql index f058eaad37d3..714593d5d231 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.Classic.MPM.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..23807bb9a0a1 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.Classic.MPM.LinqService).sql index d736a3417a1f..2c0ab97288b3 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite @@ -38,6 +111,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyAutoIncrement] +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite @@ -48,6 +133,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -8 + +DELETE FROM + [ConcurrencyAutoIncrement] +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.Classic.MPM.LinqService).sql index d44b0ce92a81..dfb3a00d872e 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..5d104a72f89d --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..738f8821c2ad --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..8e40870ac1c8 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t1].[ParentID] + )) +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.Classic.MPM.LinqService).sql index eae392c6a578..5a403060b9dc 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.Classic.MPM.LinqService).sql @@ -1,37 +1,11 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DynamicParent] -( - [ID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DynamicChild] -( - [ID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - [ParentID] INTEGER NOT NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DynamicParent] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.Classic.MPM.LinqService).sql index cb1627dbaa4d..60b6a418e219 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.Classic.MPM.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + LIMIT 1 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(Serializable) BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.Classic.MPM.LinqService).sql index b6df5018488d..c73eb2dbd34b 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.Classic.MPM.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + LIMIT 1 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..95164047af0e --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..9a5840fd5aea --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..b20c53c4a1c9 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = 'F' + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..975d5712fa4c --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..6813dff2a83e --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPM.LinqService,False).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPM.LinqService,False).sql new file mode 100644 index 000000000000..15241fe185a1 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPM.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPM.LinqService,True).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPM.LinqService,True).sql new file mode 100644 index 000000000000..15241fe185a1 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPM.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPM.LinqService,False).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPM.LinqService,False).sql new file mode 100644 index 000000000000..15241fe185a1 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPM.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPM.LinqService,True).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPM.LinqService,True).sql new file mode 100644 index 000000000000..15241fe185a1 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPM.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.Classic.MPM.LinqService).sql index 7acfc0f5df25..5805376e85db 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.Classic.MPM.LinqService).sql @@ -1,74 +1,10 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TakeSkipClass] -( - [Value] VarChar(10) NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPM.LinqService,False).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPM.LinqService,False).sql index 0897ab7f5e43..a8715bb18a82 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPM.LinqService,False).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPM.LinqService,False).sql @@ -18,3 +18,23 @@ FROM [Child] [ch] LIMIT 3 +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT 2 + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT 3 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPM.LinqService,True).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPM.LinqService,True).sql index a51e6310a819..8346bcb56b67 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPM.LinqService,True).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPM.LinqService,True).sql @@ -22,3 +22,27 @@ FROM [Child] [ch] LIMIT @take +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 2 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT @take + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT @take + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPM.LinqService,False).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPM.LinqService,False).sql new file mode 100644 index 000000000000..a52f07a4a658 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPM.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 1 + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT @n + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPM.LinqService,True).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPM.LinqService,True).sql new file mode 100644 index 000000000000..a52f07a4a658 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPM.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 1 + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT @n + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPM.LinqService,False).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPM.LinqService,False).sql new file mode 100644 index 000000000000..a65fdc930e7a --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPM.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 +LIMIT 3 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPM.LinqService,True).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPM.LinqService,True).sql new file mode 100644 index 000000000000..724afebc6dd0 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPM.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 +LIMIT @take + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPM.LinqService,False).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPM.LinqService,False).sql new file mode 100644 index 000000000000..a597f4c0c275 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPM.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 +LIMIT 3 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPM.LinqService,True).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPM.LinqService,True).sql new file mode 100644 index 000000000000..b566fc139d2a --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPM.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 +LIMIT @take + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPM.LinqService,False).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPM.LinqService,False).sql new file mode 100644 index 000000000000..27fb9c61a79f --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPM.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT 3 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPM.LinqService,True).sql b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPM.LinqService,True).sql new file mode 100644 index 000000000000..e93fd49eb5e4 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPM.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT @take + diff --git a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.Classic.MPM.LinqService).sql index ebbd3cb0a9f4..a6904e85e3a5 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.Classic.MPM.LinqService).sql @@ -1,19 +1,50 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) -DROP TABLE IF EXISTS [TestClass] +SELECT + MAX([x].[Value]) +FROM + [TestClass] [x] +WHERE + [x].[Id] = 0 BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) -CREATE TABLE IF NOT EXISTS [TestClass] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL -) +SELECT + MAX([x].[Value]) +FROM + [TestClass] [x] +WHERE + [x].[Id] = 0 BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) -DROP TABLE IF EXISTS [TestClass] +SELECT + MAX(CASE + WHEN [d].[Value] IS NOT NULL THEN [d].[Value] + ELSE 0 + END) +FROM + ( + SELECT + 1 as [c1] + ) [t1] + LEFT JOIN [TestClass] [d] ON [d].[Id] = 0 + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + MAX(CASE + WHEN [d].[Value] IS NOT NULL THEN [d].[Value] + ELSE 5 + END) +FROM + ( + SELECT + 1 as [c1] + ) [t1] + LEFT JOIN [TestClass] [d] ON [d].[Id] = 0 diff --git a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,False,False).sql b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,False,False).sql index dc7f9f210f8b..fa56d25ccbf9 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,False,False).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,False,True).sql b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,False,True).sql index dc7f9f210f8b..fa56d25ccbf9 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,False,True).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,True,False).sql b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,True,False).sql index dc7f9f210f8b..70969eae6158 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,True,False).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,True,True).sql b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,True,True).sql index dc7f9f210f8b..70969eae6158 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,True,True).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,False,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,False,False).sql b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,False,False).sql index dc7f9f210f8b..fa56d25ccbf9 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,False,False).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,False,True).sql b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,False,True).sql index dc7f9f210f8b..fa56d25ccbf9 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,False,True).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,True,False).sql b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,True,False).sql index dc7f9f210f8b..70969eae6158 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,True,False).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,True,True).sql b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,True,True).sql index dc7f9f210f8b..70969eae6158 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,True,True).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPM.LinqService,True,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..dc6b13d26dd8 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(255) NULL, + [CreatedOn] DateTime2 NULL +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.Classic.MPM.LinqService).sql index 8be472df227b..06758e010ea8 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE IF NOT EXISTS [TempTable] +( + [ID] INTEGER NOT NULL +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite SELECT @@ -7,3 +32,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..63ab1e429e49 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,87 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] +LIMIT 2 + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @ID -- Int32 +SET @ID = 1 + +DELETE FROM + [xxPerson] +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPM.LinqService,100).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPM.LinqService,100).sql index fc6eccaefce7..227ba7af1463 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPM.LinqService,100).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPM.LinqService,100).sql @@ -10,3 +10,20 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPM.LinqService,200).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPM.LinqService,200).sql index fc6eccaefce7..227ba7af1463 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPM.LinqService,200).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPM.LinqService,200).sql @@ -10,3 +10,20 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,100).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,100).sql index 7202790757b9..24a6e0d4279d 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,100).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,200).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,200).sql index 7202790757b9..24a6e0d4279d 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,200).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,100).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,100).sql index fc6eccaefce7..83c67cba2a8f 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,100).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,200).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,200).sql index fc6eccaefce7..b7e8dc87bb3a 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,200).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,100).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,100).sql index 7202790757b9..7098fa8de8d7 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,100).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,200).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,200).sql index 7202790757b9..cb86fcee3089 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,200).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,100).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,100).sql index fc6eccaefce7..a5be9f2775a2 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,100).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,200).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,200).sql index fc6eccaefce7..a5be9f2775a2 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,200).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPM.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,100).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,100).sql index 7202790757b9..d3a4cab2eebb 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,100).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,200).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,200).sql index 7202790757b9..d3a4cab2eebb 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,200).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPM.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..802964e12c46 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..0d02ad1edea4 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..0d02ad1edea4 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.Classic.MPM.LinqService).sql index 60c83b6ba6d7..87f3e61ac404 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.Classic.MPM.LinqService).sql @@ -1,5 +1,43 @@ BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) DECLARE @FirstName NVarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName NVarChar(4) -- String @@ -60,3 +98,32 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = 'Steven' AND [p].[LastName] = 'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.Classic.MPM.LinqService).sql index c6cb7579339a..f51caaaaef55 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.Classic.MPM.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id +LIMIT 2 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..25d87cf4d384 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] INTEGER NOT NULL, + [Diagnosis] NVarChar(255) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY ([PersonID]) +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.Classic.MPM.LinqService).sql index c6cb7579339a..0b6698830b04 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.Classic.MPM.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 0 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 1 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 2 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id +LIMIT 2 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.Classic.MPM.LinqService).sql index c6cb7579339a..0b6698830b04 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.Classic.MPM.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 0 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 1 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 2 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id +LIMIT 2 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.Classic.MPM.LinqService).sql index 861f5a7e3f27..89c431cb9834 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.Classic.MPM.LinqService).sql @@ -27,6 +27,21 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.Classic.MPM.LinqService).sql index 861f5a7e3f27..89c431cb9834 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.Classic.MPM.LinqService).sql @@ -27,6 +27,21 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.Classic.MPM.LinqService).sql index 7ef50b2892b7..92c317331031 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.Classic.MPM.LinqService).sql @@ -37,6 +37,23 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John0' + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) DECLARE @FirstName NVarChar(5) -- String @@ -68,6 +85,23 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John1' + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,1).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,1).sql index 5a35868076ef..5cc1fe7ff19b 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,1).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,2).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,2).sql index 5a35868076ef..8cd44047df16 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,2).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @Id -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,1).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,1).sql index 5a35868076ef..03bb1c10e223 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,1).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @value_1 -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,2).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,2).sql index 5a35868076ef..2f223bbbca6c 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,2).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @value_1 -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPM.LinqService,100).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPM.LinqService,100).sql index cab6123173c5..ceb444718d41 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPM.LinqService,100).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPM.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite DECLARE @param -- Int32 SET @param = 100 diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPM.LinqService,200).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPM.LinqService,200).sql index 8496208539b4..0acd611858ec 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPM.LinqService,200).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPM.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite DECLARE @param -- Int32 SET @param = 200 diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPM.LinqService,100).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPM.LinqService,100).sql index db2209a4dcbd..717d69e5f67f 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPM.LinqService,100).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPM.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite DECLARE @param -- Int32 SET @param = 100 diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPM.LinqService,200).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPM.LinqService,200).sql index 792376af92d3..f9a1967f747c 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPM.LinqService,200).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPM.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.Classic.MPM SQLite.Classic SQLite DECLARE @param -- Int32 SET @param = 200 diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,1).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,1).sql index 5a35868076ef..9feedb86ef4b 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,1).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Id], + [Value], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,2).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,2).sql index 5a35868076ef..58e6435812df 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,2).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPM.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 2 +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Id], + [Value], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,1).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,1).sql index 5a35868076ef..03bb1c10e223 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,1).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @value_1 -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,2).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,2).sql index 5a35868076ef..2f223bbbca6c 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,2).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPM.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @value_1 -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..061e9b1fb46d --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +UPDATE + [Parent] +SET + [ParentID] = [p2].[ParentID] +FROM + [Parent] [p2] +WHERE + [Parent].[ParentID] < 3 AND [Parent].[ParentID] = [p2].[ParentID] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..44bc1c84dbd0 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..44bc1c84dbd0 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..7e7d8793015e --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +UPDATE + [Child] +SET + [ChildID] = [Child].[ChildID] + 1 +FROM + [Parent] [a_Parent] +WHERE + [Child].[ChildID] = @id AND [a_Parent].[Value1] = 1 AND + [Child].[ParentID] = [a_Parent].[ParentID] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..05806b57d860 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +UPDATE + [Parent] +SET + [Value1] = 5 +FROM + [Child] [child_1] +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [Parent].[ParentID] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..05806b57d860 --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +UPDATE + [Parent] +SET + [Value1] = 5 +FROM + [Child] [child_1] +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [Parent].[ParentID] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.Classic.MPM.LinqService).sql new file mode 100644 index 000000000000..0c5b152661ad --- /dev/null +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.Classic.MPM.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] +LIMIT 2 + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] +LIMIT 2 + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.Classic.MPM.LinqService).sql index 7d750d151fd1..c48a85e38b51 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.Classic.MPM.LinqService).sql @@ -34,3 +34,60 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id +LIMIT 1 + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName NVarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName NVarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id +LIMIT 1 + diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPM.LinqService).sql index c3a2c3515b27..3ba2aeefe59c 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPM.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [s].[Id], + [Value] = [s].[Value], + [ValueStr] = [s].[ValueStr] +FROM + [TableWithData] [s] +WHERE + [DestinationTable].[Id] = [s].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPM.LinqService).sql index c3a2c3515b27..d98005db3a78 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPM.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [t1].[Id], + [Value] = [t1].[Value], + [ValueStr] = [t1].[ValueStr] +FROM + [TableWithData] [t1] +WHERE + [t1].[Id] = 3 AND [DestinationTable].[Id] = [t1].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPM.LinqService).sql index c3a2c3515b27..3ba2aeefe59c 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPM.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [s].[Id], + [Value] = [s].[Value], + [ValueStr] = [s].[ValueStr] +FROM + [TableWithData] [s] +WHERE + [DestinationTable].[Id] = [s].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPM.LinqService).sql index c3a2c3515b27..d98005db3a78 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPM.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [t1].[Id], + [Value] = [t1].[Value], + [ValueStr] = [t1].[ValueStr] +FROM + [TableWithData] [t1] +WHERE + [t1].[Id] = 3 AND [DestinationTable].[Id] = [t1].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPM.LinqService).sql index 6069eb018fbe..2496108217a0 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPM.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPM.LinqService).sql index 6069eb018fbe..ee43fffb4280 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPM.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPM.LinqService).sql index 6069eb018fbe..d6f8b8b6fdbc 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPM.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPM.LinqService).sql b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPM.LinqService).sql index 6069eb018fbe..ed3d895b16bf 100644 --- a/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPM.LinqService).sql +++ b/SQLite.Classic.MPM.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPM.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPM SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.Classic.MPM/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.Classic.MPM).sql b/SQLite.Classic.MPM/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.Classic.MPM).sql new file mode 100644 index 000000000000..26b23cf50129 --- /dev/null +++ b/SQLite.Classic.MPM/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.Classic.MPM).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.MPM/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.Classic.MPM).sql b/SQLite.Classic.MPM/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.Classic.MPM).sql new file mode 100644 index 000000000000..dbade198d173 --- /dev/null +++ b/SQLite.Classic.MPM/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.Classic.MPM).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.MPM/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.Classic.MPM).sql b/SQLite.Classic.MPM/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.Classic.MPM).sql new file mode 100644 index 000000000000..dbade198d173 --- /dev/null +++ b/SQLite.Classic.MPM/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.Classic.MPM).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.Classic.MPM SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..b395848aeed4 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [Person] [t1] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..9bc7bf9ea375 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ) + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..754afb839400 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN ([Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID]) + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..f29562d930ad --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..c441de8827ff --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..f29562d930ad --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..c441de8827ff --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..3e421f67134e --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @ID -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..614b07f3e36f --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 +LIMIT 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.Classic.MPU.LinqService).sql index a9f780d55f4a..806667a95bc3 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.Classic.MPU.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] LIMIT @take OFFSET @skip +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 2 +DECLARE @skip -- Int32 +SET @skip = 1 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +LIMIT @take OFFSET @skip + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..8753095fee58 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 +DECLARE @p_1 -- Int32 +SET @p_1 = 2 +DECLARE @p_2 -- Int32 +SET @p_2 = 3 +DECLARE @param -- Int32 +SET @param = 4 + +SELECT + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param +LIMIT 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..ce5295ac2258 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..ce5295ac2258 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..80d8f4f6e542 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..80d8f4f6e542 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..b905970886cd --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC +LIMIT 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..4c207f8cfda1 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT @p + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT @p + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..7b4eea752371 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..85496fce6778 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..85496fce6778 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..be468b942e99 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..be468b942e99 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..1c5a315c73a1 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..1c5a315c73a1 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..7e5c857cffd0 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + NOT EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] <> @p + ) diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..eaeb0f221fae 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ) diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..eaeb0f221fae 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ) diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..31fc6b6818af 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + AVG(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..b515b01bb9f5 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,17 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[Id] + FROM + [AsyncDataTable] [c_1] + ) + THEN 1 + ELSE 0 + END diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..8d216c9c3756 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..8d216c9c3756 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..3075fdcb3b3b 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..3075fdcb3b3b 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..3075fdcb3b3b 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..3075fdcb3b3b 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..8d216c9c3756 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..8d216c9c3756 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..4ca25ff8b9e4 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..4ca25ff8b9e4 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..928aa80e7b75 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..928aa80e7b75 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..26c96223ffb8 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..26c96223ffb8 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..26c96223ffb8 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..26c96223ffb8 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..40b349f7d453 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..40b349f7d453 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..856680385568 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..856680385568 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..3751d7411e5e 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..3751d7411e5e 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..87411094794c 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..87411094794c 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..fe5dd726dacc 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..fe5dd726dacc 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..40b349f7d453 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..40b349f7d453 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..856680385568 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..856680385568 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..3751d7411e5e 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..3751d7411e5e 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..87411094794c 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..87411094794c 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..fe5dd726dacc 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.Classic.MPU.LinqService).sql index 13147f623c29..fe5dd726dacc 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.Classic.MPU.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..404fcc67ddc0 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.Classic.MPU.LinqService).sql index ec65f6ba3af0..e892ae908d6f 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite @@ -38,6 +111,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyAutoIncrement] +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite @@ -48,6 +133,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -8 + +DELETE FROM + [ConcurrencyAutoIncrement] +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.Classic.MPU.LinqService).sql index 2692a379c853..cb925c8652bc 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..d660198d2743 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..845fc3116b19 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..9216605e8eb9 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t1].[ParentID] + )) +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.Classic.MPU.LinqService).sql index 9bd095ad7906..961ff74a78ba 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.Classic.MPU.LinqService).sql @@ -1,37 +1,11 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DynamicParent] -( - [ID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DynamicChild] -( - [ID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - [ParentID] INTEGER NOT NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DynamicParent] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.Classic.MPU.LinqService).sql index edc5509b8d70..60e2b8f29c43 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.Classic.MPU.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + LIMIT 1 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(Serializable) BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.Classic.MPU.LinqService).sql index f5d205be7e13..da071ed15ce9 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.Classic.MPU.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + LIMIT 1 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..79795c054f7c --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..f74632c61ef7 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..581e52b1506b --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = 'F' + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..5bdc92bd6ea2 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..1e3b6a06426c --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPU.LinqService,False).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPU.LinqService,False).sql new file mode 100644 index 000000000000..61dbae5c96bf --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPU.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPU.LinqService,True).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPU.LinqService,True).sql new file mode 100644 index 000000000000..61dbae5c96bf --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.MPU.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPU.LinqService,False).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPU.LinqService,False).sql new file mode 100644 index 000000000000..61dbae5c96bf --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPU.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPU.LinqService,True).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPU.LinqService,True).sql new file mode 100644 index 000000000000..61dbae5c96bf --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.MPU.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.Classic.MPU.LinqService).sql index a0f27dcc4798..f9f432dd7ea6 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.Classic.MPU.LinqService).sql @@ -1,74 +1,10 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TakeSkipClass] -( - [Value] VarChar(10) NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPU.LinqService,False).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPU.LinqService,False).sql index 331d97083dc2..475608daf707 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPU.LinqService,False).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPU.LinqService,False).sql @@ -18,3 +18,23 @@ FROM [Child] [ch] LIMIT 3 +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT 2 + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT 3 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPU.LinqService,True).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPU.LinqService,True).sql index 32192c1c088c..dc2ad44bf6fb 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPU.LinqService,True).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.MPU.LinqService,True).sql @@ -22,3 +22,27 @@ FROM [Child] [ch] LIMIT @take +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 2 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT @take + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT @take + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPU.LinqService,False).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPU.LinqService,False).sql new file mode 100644 index 000000000000..0ce2ba027d74 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPU.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 1 + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT @n + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPU.LinqService,True).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPU.LinqService,True).sql new file mode 100644 index 000000000000..0ce2ba027d74 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.MPU.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 1 + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT @n + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPU.LinqService,False).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPU.LinqService,False).sql new file mode 100644 index 000000000000..aac631015b48 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPU.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 +LIMIT 3 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPU.LinqService,True).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPU.LinqService,True).sql new file mode 100644 index 000000000000..31f51362d750 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.MPU.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 +LIMIT @take + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPU.LinqService,False).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPU.LinqService,False).sql new file mode 100644 index 000000000000..b56fe694088e --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPU.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 +LIMIT 3 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPU.LinqService,True).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPU.LinqService,True).sql new file mode 100644 index 000000000000..9d94825e309d --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.MPU.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 +LIMIT @take + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPU.LinqService,False).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPU.LinqService,False).sql new file mode 100644 index 000000000000..bd528e693470 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPU.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT 3 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPU.LinqService,True).sql b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPU.LinqService,True).sql new file mode 100644 index 000000000000..15b44c5642cc --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.MPU.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT @take + diff --git a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.Classic.MPU.LinqService).sql index c11eed1bf249..327185179b6b 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.Classic.MPU.LinqService).sql @@ -1,19 +1,50 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) -DROP TABLE IF EXISTS [TestClass] +SELECT + MAX([x].[Value]) +FROM + [TestClass] [x] +WHERE + [x].[Id] = 0 BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) -CREATE TABLE IF NOT EXISTS [TestClass] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL -) +SELECT + MAX([x].[Value]) +FROM + [TestClass] [x] +WHERE + [x].[Id] = 0 BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) -DROP TABLE IF EXISTS [TestClass] +SELECT + MAX(CASE + WHEN [d].[Value] IS NOT NULL THEN [d].[Value] + ELSE 0 + END) +FROM + ( + SELECT + 1 as [c1] + ) [t1] + LEFT JOIN [TestClass] [d] ON [d].[Id] = 0 + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + MAX(CASE + WHEN [d].[Value] IS NOT NULL THEN [d].[Value] + ELSE 5 + END) +FROM + ( + SELECT + 1 as [c1] + ) [t1] + LEFT JOIN [TestClass] [d] ON [d].[Id] = 0 diff --git a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,False,False).sql b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,False,False).sql index 5843949dd081..244493926d2c 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,False,False).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,False,True).sql b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,False,True).sql index 5843949dd081..244493926d2c 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,False,True).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,True,False).sql b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,True,False).sql index 5843949dd081..aac02819f4b8 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,True,False).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,True,True).sql b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,True,True).sql index 5843949dd081..aac02819f4b8 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,True,True).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,False,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,False,False).sql b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,False,False).sql index 5843949dd081..244493926d2c 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,False,False).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,False,True).sql b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,False,True).sql index 5843949dd081..244493926d2c 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,False,True).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,True,False).sql b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,True,False).sql index 5843949dd081..aac02819f4b8 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,True,False).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,True,True).sql b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,True,True).sql index 5843949dd081..aac02819f4b8 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,True,True).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.MPU.LinqService,True,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..2e50b636c610 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(255) NULL, + [CreatedOn] DateTime2 NULL +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.Classic.MPU.LinqService).sql index 5a8689b73d85..a797924c7b20 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE IF NOT EXISTS [TempTable] +( + [ID] INTEGER NOT NULL +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite SELECT @@ -7,3 +32,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..109445ba718e --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,87 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] +LIMIT 2 + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @ID -- Int32 +SET @ID = 1 + +DELETE FROM + [xxPerson] +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPU.LinqService,100).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPU.LinqService,100).sql index f595d72bc387..315d7369eacd 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPU.LinqService,100).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPU.LinqService,100).sql @@ -10,3 +10,20 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPU.LinqService,200).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPU.LinqService,200).sql index f595d72bc387..315d7369eacd 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPU.LinqService,200).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.MPU.LinqService,200).sql @@ -10,3 +10,20 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,100).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,100).sql index 36e54f64286e..5e45d2a61cf7 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,100).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,200).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,200).sql index 36e54f64286e..5e45d2a61cf7 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,200).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,100).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,100).sql index f595d72bc387..9445a2b1b982 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,100).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,200).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,200).sql index f595d72bc387..962241fb8a09 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,200).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,100).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,100).sql index 36e54f64286e..dff7481603ff 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,100).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,200).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,200).sql index 36e54f64286e..0e7c5111ad23 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,200).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,100).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,100).sql index f595d72bc387..971586ed62ed 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,100).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,200).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,200).sql index f595d72bc387..971586ed62ed 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,200).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.MPU.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,100).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,100).sql index 36e54f64286e..e11a5581222d 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,100).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,200).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,200).sql index 36e54f64286e..e11a5581222d 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,200).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.MPU.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..329b44960ea4 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..eb5f82bd3c07 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..eb5f82bd3c07 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.Classic.MPU.LinqService).sql index 02310118e161..71d615e398ce 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.Classic.MPU.LinqService).sql @@ -1,5 +1,43 @@ BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) DECLARE @FirstName NVarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName NVarChar(4) -- String @@ -60,3 +98,32 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = 'Steven' AND [p].[LastName] = 'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.Classic.MPU.LinqService).sql index be135fe15d71..2b3d29427492 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.Classic.MPU.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id +LIMIT 2 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..4144f10b6ce8 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] INTEGER NOT NULL, + [Diagnosis] NVarChar(255) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY ([PersonID]) +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.Classic.MPU.LinqService).sql index be135fe15d71..8867d3843a01 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.Classic.MPU.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 0 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 1 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 2 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id +LIMIT 2 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.Classic.MPU.LinqService).sql index be135fe15d71..8867d3843a01 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.Classic.MPU.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 0 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 1 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 2 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id +LIMIT 2 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.Classic.MPU.LinqService).sql index 8ddc0b7e4ebf..a744f3ee325f 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.Classic.MPU.LinqService).sql @@ -27,6 +27,21 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.Classic.MPU.LinqService).sql index 8ddc0b7e4ebf..a744f3ee325f 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.Classic.MPU.LinqService).sql @@ -27,6 +27,21 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.Classic.MPU.LinqService).sql index ca8df4444fbd..343beddbe129 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.Classic.MPU.LinqService).sql @@ -37,6 +37,23 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John0' + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) DECLARE @FirstName NVarChar(5) -- String @@ -68,6 +85,23 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John1' + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,1).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,1).sql index 1636dbb15320..ae29a4d25cb5 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,1).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,2).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,2).sql index 1636dbb15320..d4da3f6f7d37 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,2).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @Id -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,1).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,1).sql index 1636dbb15320..0bc2dde0c596 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,1).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @value_1 -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,2).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,2).sql index 1636dbb15320..da596f498fce 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,2).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @value_1 -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPU.LinqService,100).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPU.LinqService,100).sql index 3bd2240674a4..ec70fb5490c0 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPU.LinqService,100).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPU.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite DECLARE @param -- Int32 SET @param = 100 diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPU.LinqService,200).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPU.LinqService,200).sql index 7a956e9ea7e0..d55b1f3f77fa 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPU.LinqService,200).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.MPU.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite DECLARE @param -- Int32 SET @param = 200 diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPU.LinqService,100).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPU.LinqService,100).sql index 1248f4d4b2d4..e97ea2bf999f 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPU.LinqService,100).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPU.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite DECLARE @param -- Int32 SET @param = 100 diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPU.LinqService,200).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPU.LinqService,200).sql index 78bc77acbcf8..ac19070259eb 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPU.LinqService,200).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.MPU.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.Classic.MPU SQLite.Classic SQLite DECLARE @param -- Int32 SET @param = 200 diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,1).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,1).sql index 1636dbb15320..18e5476ea6c3 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,1).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Id], + [Value], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,2).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,2).sql index 1636dbb15320..9de4690e0fad 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,2).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.MPU.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 2 +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Id], + [Value], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,1).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,1).sql index 1636dbb15320..0bc2dde0c596 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,1).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @value_1 -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,2).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,2).sql index 1636dbb15320..da596f498fce 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,2).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.MPU.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @value_1 -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..e7c3664a5d10 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +UPDATE + [Parent] +SET + [ParentID] = [p2].[ParentID] +FROM + [Parent] [p2] +WHERE + [Parent].[ParentID] < 3 AND [Parent].[ParentID] = [p2].[ParentID] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..57e269bf946b --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..57e269bf946b --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..2987639ff298 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +UPDATE + [Child] +SET + [ChildID] = [Child].[ChildID] + 1 +FROM + [Parent] [a_Parent] +WHERE + [Child].[ChildID] = @id AND [a_Parent].[Value1] = 1 AND + [Child].[ParentID] = [a_Parent].[ParentID] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..6ef341efcda9 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +UPDATE + [Parent] +SET + [Value1] = 5 +FROM + [Child] [child_1] +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [Parent].[ParentID] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..6ef341efcda9 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +UPDATE + [Parent] +SET + [Value1] = 5 +FROM + [Child] [child_1] +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [Parent].[ParentID] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.Classic.MPU.LinqService).sql new file mode 100644 index 000000000000..1706771bd526 --- /dev/null +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.Classic.MPU.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] +LIMIT 2 + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] +LIMIT 2 + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.Classic.MPU.LinqService).sql index 510eb2298ecf..98fedfba510d 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.Classic.MPU.LinqService).sql @@ -34,3 +34,60 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id +LIMIT 1 + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName NVarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName NVarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id +LIMIT 1 + diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPU.LinqService).sql index 97d2e1c5a1c3..134e4ee26783 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPU.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [s].[Id], + [Value] = [s].[Value], + [ValueStr] = [s].[ValueStr] +FROM + [TableWithData] [s] +WHERE + [DestinationTable].[Id] = [s].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPU.LinqService).sql index 97d2e1c5a1c3..36f949ec4d38 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPU.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [t1].[Id], + [Value] = [t1].[Value], + [ValueStr] = [t1].[ValueStr] +FROM + [TableWithData] [t1] +WHERE + [t1].[Id] = 3 AND [DestinationTable].[Id] = [t1].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPU.LinqService).sql index 97d2e1c5a1c3..134e4ee26783 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.MPU.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [s].[Id], + [Value] = [s].[Value], + [ValueStr] = [s].[ValueStr] +FROM + [TableWithData] [s] +WHERE + [DestinationTable].[Id] = [s].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPU.LinqService).sql index 97d2e1c5a1c3..36f949ec4d38 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.MPU.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [t1].[Id], + [Value] = [t1].[Value], + [ValueStr] = [t1].[ValueStr] +FROM + [TableWithData] [t1] +WHERE + [t1].[Id] = 3 AND [DestinationTable].[Id] = [t1].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPU.LinqService).sql index e3a829bfaa7c..1a83711fafc7 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPU.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPU.LinqService).sql index e3a829bfaa7c..98f57149671f 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPU.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPU.LinqService).sql index e3a829bfaa7c..896d214a2372 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.MPU.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPU.LinqService).sql b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPU.LinqService).sql index e3a829bfaa7c..e02968f9e6cb 100644 --- a/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPU.LinqService).sql +++ b/SQLite.Classic.MPU.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.MPU.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic.MPU SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.Classic.MPU/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.Classic.MPU).sql b/SQLite.Classic.MPU/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.Classic.MPU).sql new file mode 100644 index 000000000000..c9ff4c117d2c --- /dev/null +++ b/SQLite.Classic.MPU/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.Classic.MPU).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.MPU/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.Classic.MPU).sql b/SQLite.Classic.MPU/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.Classic.MPU).sql new file mode 100644 index 000000000000..f29562d930ad --- /dev/null +++ b/SQLite.Classic.MPU/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.Classic.MPU).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.MPU/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.Classic.MPU).sql b/SQLite.Classic.MPU/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.Classic.MPU).sql new file mode 100644 index 000000000000..f29562d930ad --- /dev/null +++ b/SQLite.Classic.MPU/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.Classic.MPU).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.Classic.MPU SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From f6e841820578b665e0e1eb03e6f8e53207f8ee2c Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Thu, 20 Feb 2025 07:14:11 +0000 Subject: [PATCH 35/40] [Windows / SQLite (both providers)] baselines --- ...text_Async(SQLite.Classic.LinqService).sql | 12 + ....All4Async(SQLite.Classic.LinqService).sql | 13 + ...upBy2Async(SQLite.Classic.LinqService).sql | 30 ++ ...rable1Test(SQLite.Classic.LinqService).sql | 9 + ...rable2Test(SQLite.Classic.LinqService).sql | 11 + ...eCast1Test(SQLite.Classic.LinqService).sql | 9 + ...eCast2Test(SQLite.Classic.LinqService).sql | 11 + ...sAsyncTest(SQLite.Classic.LinqService).sql | 17 + ...tAsyncTest(SQLite.Classic.LinqService).sql | 15 + ...keSkipTest(SQLite.Classic.LinqService).sql | 16 + ...tOrDefault(SQLite.Classic.LinqService).sql | 20 + ...pAsyncTest(SQLite.Classic.LinqService).sql | 21 + ...tAsyncTest(SQLite.Classic.LinqService).sql | 21 + ...yTestAsync(SQLite.Classic.LinqService).sql | 30 ++ ...TestAsync2(SQLite.Classic.LinqService).sql | 30 ++ ...AsyncdTest(SQLite.Classic.LinqService).sql | 16 + ...Test3Async(SQLite.Classic.LinqService).sql | 28 ++ ...sTestAsync(SQLite.Classic.LinqService).sql | 34 ++ ...tTestAsync(SQLite.Classic.LinqService).sql | 24 + ...TestAsync2(SQLite.Classic.LinqService).sql | 24 + ...TestAsync1(SQLite.Classic.LinqService).sql | 28 ++ ...TestAsync2(SQLite.Classic.LinqService).sql | 28 ++ ...xTestAsync(SQLite.Classic.LinqService).sql | 24 + ...TestAsync2(SQLite.Classic.LinqService).sql | 24 + ...c.AllAsync(SQLite.Classic.LinqService).sql | 171 +------ ...c.AnyAsync(SQLite.Classic.LinqService).sql | 171 +------ ...icateAsync(SQLite.Classic.LinqService).sql | 171 +------ ...eAsyncLong(SQLite.Classic.LinqService).sql | 168 +------ ...tainsAsync(SQLite.Classic.LinqService).sql | 173 +------ ...CountAsync(SQLite.Classic.LinqService).sql | 168 +------ ...icateAsync(SQLite.Classic.LinqService).sql | 168 +------ ...FirstAsync(SQLite.Classic.LinqService).sql | 170 +------ ...faultAsync(SQLite.Classic.LinqService).sql | 170 +------ ...icateAsync(SQLite.Classic.LinqService).sql | 170 +------ ...icateAsync(SQLite.Classic.LinqService).sql | 170 +------ ...CountAsync(SQLite.Classic.LinqService).sql | 168 +------ ...icateAsync(SQLite.Classic.LinqService).sql | 168 +------ ...c.MaxAsync(SQLite.Classic.LinqService).sql | 168 +------ ...ectorAsync(SQLite.Classic.LinqService).sql | 168 +------ ...c.MinAsync(SQLite.Classic.LinqService).sql | 168 +------ ...ectorAsync(SQLite.Classic.LinqService).sql | 168 +------ ...ingleAsync(SQLite.Classic.LinqService).sql | 170 +------ ...faultAsync(SQLite.Classic.LinqService).sql | 170 +------ ...icateAsync(SQLite.Classic.LinqService).sql | 170 +------ ...icateAsync(SQLite.Classic.LinqService).sql | 170 +------ ...yncDecimal(SQLite.Classic.LinqService).sql | 168 +------ ...ncDecimalN(SQLite.Classic.LinqService).sql | 168 +------ ...syncDouble(SQLite.Classic.LinqService).sql | 168 +------ ...yncDoubleN(SQLite.Classic.LinqService).sql | 168 +------ ...AsyncFloat(SQLite.Classic.LinqService).sql | 168 +------ ...syncFloatN(SQLite.Classic.LinqService).sql | 168 +------ ...umAsyncInt(SQLite.Classic.LinqService).sql | 168 +------ ...mAsyncIntN(SQLite.Classic.LinqService).sql | 168 +------ ...mAsyncLong(SQLite.Classic.LinqService).sql | 168 +------ ...AsyncLongN(SQLite.Classic.LinqService).sql | 168 +------ ...torDecimal(SQLite.Classic.LinqService).sql | 168 +------ ...orDecimalN(SQLite.Classic.LinqService).sql | 168 +------ ...ctorDouble(SQLite.Classic.LinqService).sql | 168 +------ ...torDoubleN(SQLite.Classic.LinqService).sql | 168 +------ ...ectorFloat(SQLite.Classic.LinqService).sql | 168 +------ ...ctorFloatN(SQLite.Classic.LinqService).sql | 168 +------ ...electorInt(SQLite.Classic.LinqService).sql | 168 +------ ...lectorIntN(SQLite.Classic.LinqService).sql | 168 +------ ...lectorLong(SQLite.Classic.LinqService).sql | 168 +------ ...ectorLongN(SQLite.Classic.LinqService).sql | 168 +------ ...ncat1Async(SQLite.Classic.LinqService).sql | 19 + ...ementAsync(SQLite.Classic.LinqService).sql | 97 ++++ ...teredAsync(SQLite.Classic.LinqService).sql | 84 ++++ ...ount1Async(SQLite.Classic.LinqService).sql | 8 + ...ount2Async(SQLite.Classic.LinqService).sql | 10 + ...yMax1Async(SQLite.Classic.LinqService).sql | 16 + ....Issue4602(SQLite.Classic.LinqService).sql | 44 +- ...4057_Async(SQLite.Classic.LinqService).sql | 31 ++ ...ransaction(SQLite.Classic.LinqService).sql | 31 ++ ...ssionAsync(SQLite.Classic.LinqService).sql | 25 + ...Cast1Async(SQLite.Classic.LinqService).sql | 11 + ...est18Async(SQLite.Classic.LinqService).sql | 14 + ...eter1Async(SQLite.Classic.LinqService).sql | 6 + ...ue3132Test(SQLite.Classic.LinqService).sql | 213 +++++++++ ...sync(SQLite.Classic.LinqService,False).sql | 16 + ...Async(SQLite.Classic.LinqService,True).sql | 16 + ...sync(SQLite.Classic.LinqService,False).sql | 16 + ...Async(SQLite.Classic.LinqService,True).sql | 16 + ...Skip1Async(SQLite.Classic.LinqService).sql | 80 +--- ...sync(SQLite.Classic.LinqService,False).sql | 20 + ...Async(SQLite.Classic.LinqService,True).sql | 24 + ...sync(SQLite.Classic.LinqService,False).sql | 12 + ...Async(SQLite.Classic.LinqService,True).sql | 12 + ...sync(SQLite.Classic.LinqService,False).sql | 12 + ...Async(SQLite.Classic.LinqService,True).sql | 14 + ...sync(SQLite.Classic.LinqService,False).sql | 12 + ...Async(SQLite.Classic.LinqService,True).sql | 14 + ...sync(SQLite.Classic.LinqService,False).sql | 10 + ...Async(SQLite.Classic.LinqService,True).sql | 12 + ...onWithNull(SQLite.Classic.LinqService).sql | 51 +- ...Classic.LinqService,False,False,False).sql | 16 + ....Classic.LinqService,False,False,True).sql | 16 + ....Classic.LinqService,False,True,False).sql | 16 + ...e.Classic.LinqService,False,True,True).sql | 16 + ....Classic.LinqService,True,False,False).sql | 16 + ...e.Classic.LinqService,True,False,True).sql | 16 + ...e.Classic.LinqService,True,True,False).sql | 16 + ...te.Classic.LinqService,True,True,True).sql | 16 + ...able1Async(SQLite.Classic.LinqService).sql | 32 ++ ...TableAsync(SQLite.Classic.LinqService).sql | 30 ++ ...eNameAsync(SQLite.Classic.LinqService).sql | 87 ++++ ...ncTest(SQLite.Classic.LinqService,100).sql | 17 + ...ncTest(SQLite.Classic.LinqService,200).sql | 17 + ...Record(SQLite.Classic.LinqService,100).sql | 12 + ...Record(SQLite.Classic.LinqService,200).sql | 12 + ...ncTest(SQLite.Classic.LinqService,100).sql | 14 + ...ncTest(SQLite.Classic.LinqService,200).sql | 14 + ...Record(SQLite.Classic.LinqService,100).sql | 14 + ...Record(SQLite.Classic.LinqService,200).sql | 14 + ...ncTest(SQLite.Classic.LinqService,100).sql | 11 + ...ncTest(SQLite.Classic.LinqService,200).sql | 11 + ...Record(SQLite.Classic.LinqService,100).sql | 11 + ...Record(SQLite.Classic.LinqService,200).sql | 11 + ...sert2Async(SQLite.Classic.LinqService).sql | 44 ++ ...sert3Async(SQLite.Classic.LinqService).sql | 46 ++ ...sert4Async(SQLite.Classic.LinqService).sql | 46 ++ ...eNameAsync(SQLite.Classic.LinqService).sql | 67 +++ ...lace1Async(SQLite.Classic.LinqService).sql | 74 +++ ...eNameAsync(SQLite.Classic.LinqService).sql | 117 +++++ ...date3Async(SQLite.Classic.LinqService).sql | 74 +++ ...ate3xAsync(SQLite.Classic.LinqService).sql | 74 +++ ...tity1Async(SQLite.Classic.LinqService).sql | 15 + ...tity2Async(SQLite.Classic.LinqService).sql | 15 + ...tity4Async(SQLite.Classic.LinqService).sql | 34 ++ ...syncTest(SQLite.Classic.LinqService,1).sql | 36 +- ...syncTest(SQLite.Classic.LinqService,2).sql | 36 +- ...syncTest(SQLite.Classic.LinqService,1).sql | 36 +- ...syncTest(SQLite.Classic.LinqService,2).sql | 36 +- ...tAsync(SQLite.Classic.LinqService,100).sql | 24 + ...tAsync(SQLite.Classic.LinqService,200).sql | 24 + ...Record(SQLite.Classic.LinqService,100).sql | 24 + ...Record(SQLite.Classic.LinqService,200).sql | 24 + ...syncTest(SQLite.Classic.LinqService,1).sql | 36 +- ...syncTest(SQLite.Classic.LinqService,2).sql | 36 +- ...syncTest(SQLite.Classic.LinqService,1).sql | 36 +- ...syncTest(SQLite.Classic.LinqService,2).sql | 36 +- ...ate12Async(SQLite.Classic.LinqService).sql | 12 + ...date1Async(SQLite.Classic.LinqService).sql | 54 +++ ...date2Async(SQLite.Classic.LinqService).sql | 54 +++ ...date4Async(SQLite.Classic.LinqService).sql | 55 +++ ...tion1Async(SQLite.Classic.LinqService).sql | 40 ++ ...n1AsyncOld(SQLite.Classic.LinqService).sql | 40 ++ ...eNameAsync(SQLite.Classic.LinqService).sql | 105 ++++ ...plex1Async(SQLite.Classic.LinqService).sql | 57 +++ ...nateUpdate(SQLite.Classic.LinqService).sql | 448 +----------------- ...ngleRecord(SQLite.Classic.LinqService).sql | 448 +----------------- ...nateUpdate(SQLite.Classic.LinqService).sql | 448 +----------------- ...ngleRecord(SQLite.Classic.LinqService).sql | 448 +----------------- ...WithoutOld(SQLite.Classic.LinqService).sql | 227 +-------- ...ngleRecord(SQLite.Classic.LinqService).sql | 227 +-------- ...WithoutOld(SQLite.Classic.LinqService).sql | 228 +-------- ...ngleRecord(SQLite.Classic.LinqService).sql | 228 +-------- ...s.Linq.AsyncTests.Test(SQLite.Classic).sql | 18 + ....Linq.AsyncTests.Test1(SQLite.Classic).sql | 9 + ...AsyncTests.TestForEach(SQLite.Classic).sql | 9 + ...teContext_Async(SQLite.MS.LinqService).sql | 12 + ...Tests.All4Async(SQLite.MS.LinqService).sql | 13 + ...s.GroupBy2Async(SQLite.MS.LinqService).sql | 30 ++ ...Enumerable1Test(SQLite.MS.LinqService).sql | 9 + ...Enumerable2Test(SQLite.MS.LinqService).sql | 11 + ...erableCast1Test(SQLite.MS.LinqService).sql | 9 + ...erableCast2Test(SQLite.MS.LinqService).sql | 11 + ...ntainsAsyncTest(SQLite.MS.LinqService).sql | 17 + ....FirstAsyncTest(SQLite.MS.LinqService).sql | 15 + ...ts.TakeSkipTest(SQLite.MS.LinqService).sql | 16 + ...tFirstOrDefault(SQLite.MS.LinqService).sql | 20 + ...LookupAsyncTest(SQLite.MS.LinqService).sql | 21 + ...lementAsyncTest(SQLite.MS.LinqService).sql | 21 + ...ts.AnyTestAsync(SQLite.MS.LinqService).sql | 30 ++ ...s.AnyTestAsync2(SQLite.MS.LinqService).sql | 30 ++ ...MethoAsyncdTest(SQLite.MS.LinqService).sql | 16 + ...piledTest3Async(SQLite.MS.LinqService).sql | 28 ++ ...ntainsTestAsync(SQLite.MS.LinqService).sql | 34 ++ ....CountTestAsync(SQLite.MS.LinqService).sql | 24 + ...CountTestAsync2(SQLite.MS.LinqService).sql | 24 + ...ementTestAsync1(SQLite.MS.LinqService).sql | 28 ++ ...ementTestAsync2(SQLite.MS.LinqService).sql | 28 ++ ...ts.MaxTestAsync(SQLite.MS.LinqService).sql | 24 + ...s.MaxTestAsync2(SQLite.MS.LinqService).sql | 24 + ...sAsync.AllAsync(SQLite.MS.LinqService).sql | 171 +------ ...sAsync.AnyAsync(SQLite.MS.LinqService).sql | 171 +------ ...yPredicateAsync(SQLite.MS.LinqService).sql | 171 +------ ...verageAsyncLong(SQLite.MS.LinqService).sql | 168 +------ ...c.ContainsAsync(SQLite.MS.LinqService).sql | 173 +------ ...sync.CountAsync(SQLite.MS.LinqService).sql | 168 +------ ...tPredicateAsync(SQLite.MS.LinqService).sql | 168 +------ ...sync.FirstAsync(SQLite.MS.LinqService).sql | 170 +------ ...tOrDefaultAsync(SQLite.MS.LinqService).sql | 170 +------ ...tPredicateAsync(SQLite.MS.LinqService).sql | 170 +------ ...tPredicateAsync(SQLite.MS.LinqService).sql | 170 +------ ....LongCountAsync(SQLite.MS.LinqService).sql | 168 +------ ...tPredicateAsync(SQLite.MS.LinqService).sql | 168 +------ ...sAsync.MaxAsync(SQLite.MS.LinqService).sql | 168 +------ ...axSelectorAsync(SQLite.MS.LinqService).sql | 168 +------ ...sAsync.MinAsync(SQLite.MS.LinqService).sql | 168 +------ ...inSelectorAsync(SQLite.MS.LinqService).sql | 168 +------ ...ync.SingleAsync(SQLite.MS.LinqService).sql | 170 +------ ...eOrDefaultAsync(SQLite.MS.LinqService).sql | 170 +------ ...tPredicateAsync(SQLite.MS.LinqService).sql | 170 +------ ...ePredicateAsync(SQLite.MS.LinqService).sql | 170 +------ ...SumAsyncDecimal(SQLite.MS.LinqService).sql | 168 +------ ...umAsyncDecimalN(SQLite.MS.LinqService).sql | 168 +------ ....SumAsyncDouble(SQLite.MS.LinqService).sql | 168 +------ ...SumAsyncDoubleN(SQLite.MS.LinqService).sql | 168 +------ ...c.SumAsyncFloat(SQLite.MS.LinqService).sql | 168 +------ ....SumAsyncFloatN(SQLite.MS.LinqService).sql | 168 +------ ...ync.SumAsyncInt(SQLite.MS.LinqService).sql | 168 +------ ...nc.SumAsyncIntN(SQLite.MS.LinqService).sql | 168 +------ ...nc.SumAsyncLong(SQLite.MS.LinqService).sql | 168 +------ ...c.SumAsyncLongN(SQLite.MS.LinqService).sql | 168 +------ ...SelectorDecimal(SQLite.MS.LinqService).sql | 168 +------ ...electorDecimalN(SQLite.MS.LinqService).sql | 168 +------ ...cSelectorDouble(SQLite.MS.LinqService).sql | 168 +------ ...SelectorDoubleN(SQLite.MS.LinqService).sql | 168 +------ ...ncSelectorFloat(SQLite.MS.LinqService).sql | 168 +------ ...cSelectorFloatN(SQLite.MS.LinqService).sql | 168 +------ ...syncSelectorInt(SQLite.MS.LinqService).sql | 168 +------ ...yncSelectorIntN(SQLite.MS.LinqService).sql | 168 +------ ...yncSelectorLong(SQLite.MS.LinqService).sql | 168 +------ ...ncSelectorLongN(SQLite.MS.LinqService).sql | 168 +------ ...ts.Concat1Async(SQLite.MS.LinqService).sql | 19 + ...oIncrementAsync(SQLite.MS.LinqService).sql | 97 ++++ ...stFilteredAsync(SQLite.MS.LinqService).sql | 84 ++++ ...sts.Count1Async(SQLite.MS.LinqService).sql | 8 + ...sts.Count2Async(SQLite.MS.LinqService).sql | 10 + ...bQueryMax1Async(SQLite.MS.LinqService).sql | 16 + ...Tests.Issue4602(SQLite.MS.LinqService).sql | 44 +- ...Issue4057_Async(SQLite.MS.LinqService).sql | 31 ++ ...icitTransaction(SQLite.MS.LinqService).sql | 31 ++ ...ExpressionAsync(SQLite.MS.LinqService).sql | 25 + ...ests.Cast1Async(SQLite.MS.LinqService).sql | 11 + ...sts.Test18Async(SQLite.MS.LinqService).sql | 14 + ...Parameter1Async(SQLite.MS.LinqService).sql | 6 + ...s.Issue3132Test(SQLite.MS.LinqService).sql | 213 +++++++++ ...tAt2Async(SQLite.MS.LinqService,False).sql | 16 + ...ntAt2Async(SQLite.MS.LinqService,True).sql | 16 + ...ult3Async(SQLite.MS.LinqService,False).sql | 16 + ...ault3Async(SQLite.MS.LinqService,True).sql | 16 + ...tipleSkip1Async(SQLite.MS.LinqService).sql | 80 +--- ...ake1Async(SQLite.MS.LinqService,False).sql | 20 + ...Take1Async(SQLite.MS.LinqService,True).sql | 24 + ...ake2Async(SQLite.MS.LinqService,False).sql | 12 + ...Take2Async(SQLite.MS.LinqService,True).sql | 12 + ...ake3Async(SQLite.MS.LinqService,False).sql | 12 + ...Take3Async(SQLite.MS.LinqService,True).sql | 14 + ...ake4Async(SQLite.MS.LinqService,False).sql | 12 + ...Take4Async(SQLite.MS.LinqService,True).sql | 14 + ...ake5Async(SQLite.MS.LinqService,False).sql | 10 + ...Take5Async(SQLite.MS.LinqService,True).sql | 12 + ...egationWithNull(SQLite.MS.LinqService).sql | 51 +- ...Lite.MS.LinqService,False,False,False).sql | 16 + ...QLite.MS.LinqService,False,False,True).sql | 16 + ...QLite.MS.LinqService,False,True,False).sql | 16 + ...SQLite.MS.LinqService,False,True,True).sql | 16 + ...QLite.MS.LinqService,True,False,False).sql | 16 + ...SQLite.MS.LinqService,True,False,True).sql | 16 + ...SQLite.MS.LinqService,True,True,False).sql | 16 + ...(SQLite.MS.LinqService,True,True,True).sql | 16 + ...eateTable1Async(SQLite.MS.LinqService).sql | 32 ++ ...reateTableAsync(SQLite.MS.LinqService).sql | 30 ++ ...yTableNameAsync(SQLite.MS.LinqService).sql | 87 ++++ ...utAsyncTest(SQLite.MS.LinqService,100).sql | 17 + ...utAsyncTest(SQLite.MS.LinqService,200).sql | 17 + ...ingleRecord(SQLite.MS.LinqService,100).sql | 12 + ...ingleRecord(SQLite.MS.LinqService,200).sql | 12 + ...ryAsyncTest(SQLite.MS.LinqService,100).sql | 14 + ...ryAsyncTest(SQLite.MS.LinqService,200).sql | 14 + ...ingleRecord(SQLite.MS.LinqService,100).sql | 14 + ...ingleRecord(SQLite.MS.LinqService,200).sql | 14 + ...ryAsyncTest(SQLite.MS.LinqService,100).sql | 11 + ...ryAsyncTest(SQLite.MS.LinqService,200).sql | 11 + ...ingleRecord(SQLite.MS.LinqService,100).sql | 11 + ...ingleRecord(SQLite.MS.LinqService,200).sql | 11 + ...ts.Insert2Async(SQLite.MS.LinqService).sql | 44 ++ ...ts.Insert3Async(SQLite.MS.LinqService).sql | 46 ++ ...ts.Insert4Async(SQLite.MS.LinqService).sql | 46 ++ ...yTableNameAsync(SQLite.MS.LinqService).sql | 67 +++ ...OrReplace1Async(SQLite.MS.LinqService).sql | 74 +++ ...yTableNameAsync(SQLite.MS.LinqService).sql | 117 +++++ ...tOrUpdate3Async(SQLite.MS.LinqService).sql | 74 +++ ...OrUpdate3xAsync(SQLite.MS.LinqService).sql | 74 +++ ...hIdentity1Async(SQLite.MS.LinqService).sql | 15 + ...hIdentity2Async(SQLite.MS.LinqService).sql | 15 + ...hIdentity4Async(SQLite.MS.LinqService).sql | 34 ++ ...tObjAsyncTest(SQLite.MS.LinqService,1).sql | 36 +- ...tObjAsyncTest(SQLite.MS.LinqService,2).sql | 36 +- ...tterAsyncTest(SQLite.MS.LinqService,1).sql | 36 +- ...tterAsyncTest(SQLite.MS.LinqService,2).sql | 36 +- ...ryTestAsync(SQLite.MS.LinqService,100).sql | 24 + ...ryTestAsync(SQLite.MS.LinqService,200).sql | 24 + ...ingleRecord(SQLite.MS.LinqService,100).sql | 24 + ...ingleRecord(SQLite.MS.LinqService,200).sql | 24 + ...tObjAsyncTest(SQLite.MS.LinqService,1).sql | 36 +- ...tObjAsyncTest(SQLite.MS.LinqService,2).sql | 36 +- ...tterAsyncTest(SQLite.MS.LinqService,1).sql | 36 +- ...tterAsyncTest(SQLite.MS.LinqService,2).sql | 36 +- ...s.Update12Async(SQLite.MS.LinqService).sql | 12 + ...ts.Update1Async(SQLite.MS.LinqService).sql | 54 +++ ...ts.Update2Async(SQLite.MS.LinqService).sql | 54 +++ ...ts.Update4Async(SQLite.MS.LinqService).sql | 55 +++ ...sociation1Async(SQLite.MS.LinqService).sql | 40 ++ ...iation1AsyncOld(SQLite.MS.LinqService).sql | 40 ++ ...yTableNameAsync(SQLite.MS.LinqService).sql | 105 ++++ ...teComplex1Async(SQLite.MS.LinqService).sql | 57 +++ ...AlternateUpdate(SQLite.MS.LinqService).sql | 448 +----------------- ...ateSingleRecord(SQLite.MS.LinqService).sql | 448 +----------------- ...AlternateUpdate(SQLite.MS.LinqService).sql | 448 +----------------- ...ateSingleRecord(SQLite.MS.LinqService).sql | 448 +----------------- ...AsyncWithoutOld(SQLite.MS.LinqService).sql | 227 +-------- ...OldSingleRecord(SQLite.MS.LinqService).sql | 227 +-------- ...AsyncWithoutOld(SQLite.MS.LinqService).sql | 228 +-------- ...OldSingleRecord(SQLite.MS.LinqService).sql | 228 +-------- .../Tests.Linq.AsyncTests.Test(SQLite.MS).sql | 18 + ...Tests.Linq.AsyncTests.Test1(SQLite.MS).sql | 9 + ...Linq.AsyncTests.TestForEach(SQLite.MS).sql | 9 + 320 files changed, 7248 insertions(+), 18630 deletions(-) create mode 100644 SQLite.Classic.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.LinqService,False).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.LinqService,True).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.LinqService,False).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.LinqService,True).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.LinqService,False).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.LinqService,True).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.LinqService,False).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.LinqService,True).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.LinqService,False).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.LinqService,True).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.LinqService,False).sql create mode 100644 SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.LinqService,True).sql create mode 100644 SQLite.Classic.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.Classic.LinqService).sql create mode 100644 SQLite.Classic/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.Classic).sql create mode 100644 SQLite.Classic/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.Classic).sql create mode 100644 SQLite.Classic/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.Classic).sql create mode 100644 SQLite.MS.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.MS.LinqService,False).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.MS.LinqService,True).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.MS.LinqService,False).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.MS.LinqService,True).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.MS.LinqService,False).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.MS.LinqService,True).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.MS.LinqService,False).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.MS.LinqService,True).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.MS.LinqService,False).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.MS.LinqService,True).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.MS.LinqService,False).sql create mode 100644 SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.MS.LinqService,True).sql create mode 100644 SQLite.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.MS.LinqService).sql create mode 100644 SQLite.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.MS).sql create mode 100644 SQLite.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.MS).sql create mode 100644 SQLite.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.MS).sql diff --git a/SQLite.Classic.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..f087dd8ce712 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [Person] [t1] + diff --git a/SQLite.Classic.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..7f44db9e39fb --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ) + diff --git a/SQLite.Classic.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..411e5435ea77 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN ([Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID]) + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..7ab20ec4c022 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.Classic.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..4b8616d73909 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.Classic.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..7ab20ec4c022 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.Classic.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..4b8616d73909 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.Classic.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..da4dca9005be --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.Classic.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @ID -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..5a0dc7a01baf --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.Classic.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 +LIMIT 1 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.Classic.LinqService).sql index 912933a199ce..e853a1243873 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.Classic.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] LIMIT @take OFFSET @skip +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 2 +DECLARE @skip -- Int32 +SET @skip = 1 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +LIMIT @take OFFSET @skip + diff --git a/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..1f51bd36b039 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.Classic.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 +DECLARE @p_1 -- Int32 +SET @p_1 = 2 +DECLARE @p_2 -- Int32 +SET @p_2 = 3 +DECLARE @param -- Int32 +SET @param = 4 + +SELECT + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param +LIMIT 1 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..d69a27288417 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.Classic.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..d69a27288417 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.Classic.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..7370381ea7af --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.Classic.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..7370381ea7af --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.Classic.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..a32c4f3f0f10 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.Classic.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC +LIMIT 1 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..e8a912c8d24d --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT @p + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT @p + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..5f84c52e4d9b --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.Classic.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..1b19566adb7b --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.Classic.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..1b19566adb7b --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.Classic.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..39875e4cb3fe --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.Classic.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..39875e4cb3fe --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.Classic.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..c63dfa77d60e --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.Classic.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..c63dfa77d60e --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.Classic.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..8631854bb16d 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + NOT EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] <> @p + ) diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..2f06774ce3c1 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ) diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..2f06774ce3c1 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ) diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.Classic.LinqService).sql index aab9c3d8cd51..86e96aa7a982 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + AVG(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..3962eb8e2b89 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,17 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[Id] + FROM + [AsyncDataTable] [c_1] + ) + THEN 1 + ELSE 0 + END diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..26ab295ab04c 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..26ab295ab04c 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..d2e4af0b2772 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..d2e4af0b2772 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..d2e4af0b2772 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..d2e4af0b2772 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..26ab295ab04c 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..26ab295ab04c 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..1faeec01b4d9 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..1faeec01b4d9 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..e395e2bf0120 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..e395e2bf0120 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..7b101582fa13 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..7b101582fa13 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..7b101582fa13 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.Classic.LinqService).sql index aab9c3d8cd51..7b101582fa13 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.Classic.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.Classic.LinqService).sql index aab9c3d8cd51..9c44ce57af49 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.Classic.LinqService).sql index aab9c3d8cd51..9c44ce57af49 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.Classic.LinqService).sql index aab9c3d8cd51..1d4f9c2d7568 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.Classic.LinqService).sql index aab9c3d8cd51..1d4f9c2d7568 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.Classic.LinqService).sql index aab9c3d8cd51..d05afdd9c062 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.Classic.LinqService).sql index aab9c3d8cd51..d05afdd9c062 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.Classic.LinqService).sql index aab9c3d8cd51..20a3e94c8054 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.Classic.LinqService).sql index aab9c3d8cd51..20a3e94c8054 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.Classic.LinqService).sql index aab9c3d8cd51..96c54ed971f9 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.Classic.LinqService).sql index aab9c3d8cd51..96c54ed971f9 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.Classic.LinqService).sql index aab9c3d8cd51..9c44ce57af49 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.Classic.LinqService).sql index aab9c3d8cd51..9c44ce57af49 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.Classic.LinqService).sql index aab9c3d8cd51..1d4f9c2d7568 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.Classic.LinqService).sql index aab9c3d8cd51..1d4f9c2d7568 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.Classic.LinqService).sql index aab9c3d8cd51..d05afdd9c062 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.Classic.LinqService).sql index aab9c3d8cd51..d05afdd9c062 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.Classic.LinqService).sql index aab9c3d8cd51..20a3e94c8054 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.Classic.LinqService).sql index aab9c3d8cd51..20a3e94c8054 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.Classic.LinqService).sql index aab9c3d8cd51..96c54ed971f9 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.Classic.LinqService).sql index aab9c3d8cd51..96c54ed971f9 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.Classic.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.Classic.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..015253c4be73 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.Classic.LinqService).sql index 6efc15f705fc..f71f06bab352 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.Classic.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SQLite.Classic SQLite SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic SQLite @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic SQLite @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic SQLite @@ -38,6 +111,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyAutoIncrement] +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic SQLite @@ -48,6 +133,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -8 + +DELETE FROM + [ConcurrencyAutoIncrement] +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic SQLite diff --git a/SQLite.Classic.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.Classic.LinqService).sql index 4a65f6ba24a3..dbdf3708d715 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.Classic.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SQLite.Classic SQLite SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic SQLite @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic SQLite @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic SQLite @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.Classic SQLite diff --git a/SQLite.Classic.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..b5a9296ab267 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..50d5ccd55d7b --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..9109a4a234cc --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t1].[ParentID] + )) +FROM + [Parent] [t1] + diff --git a/SQLite.Classic.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.Classic.LinqService).sql index bf7486d1c3fa..d8d0dbfb2b7f 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.Classic.LinqService).sql @@ -1,37 +1,11 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DynamicParent] -( - [ID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DynamicChild] -( - [ID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - [ParentID] INTEGER NOT NULL -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DynamicParent] +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SQLite.Classic.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.Classic.LinqService).sql index 6a6d847a05cc..e08e43f88b26 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.Classic.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + LIMIT 1 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(Serializable) BeforeExecute -- SQLite.Classic SQLite (asynchronously) diff --git a/SQLite.Classic.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.Classic.LinqService).sql index 83c4f0f7fa9d..06c787528ec7 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.Classic.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + LIMIT 1 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- SQLite.Classic SQLite (asynchronously) diff --git a/SQLite.Classic.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..4cdd84f8cad3 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.Classic.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SQLite.Classic.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..1de28737ae0b --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..46e1514c9f6a --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = 'F' + diff --git a/SQLite.Classic.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..e580dfe390ac --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + 1 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..a0d9829486ef --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.Classic.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.LinqService,False).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.LinqService,False).sql new file mode 100644 index 000000000000..daed5c89f6a6 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.LinqService,True).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.LinqService,True).sql new file mode 100644 index 000000000000..daed5c89f6a6 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.Classic.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.LinqService,False).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.LinqService,False).sql new file mode 100644 index 000000000000..daed5c89f6a6 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.LinqService,True).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.LinqService,True).sql new file mode 100644 index 000000000000..daed5c89f6a6 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.Classic.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.Classic.LinqService).sql index 72b83840e4e8..97ca5e394a2e 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.Classic.LinqService).sql @@ -1,74 +1,10 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TakeSkipClass] -( - [Value] VarChar(10) NULL -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.LinqService,False).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.LinqService,False).sql index bffae252c7b2..c4a35ebd9c01 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.LinqService,False).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.LinqService,False).sql @@ -18,3 +18,23 @@ FROM [Child] [ch] LIMIT 3 +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT 2 + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT 3 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.LinqService,True).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.LinqService,True).sql index b99766473376..20798e1b216e 100644 --- a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.LinqService,True).sql +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.Classic.LinqService,True).sql @@ -22,3 +22,27 @@ FROM [Child] [ch] LIMIT @take +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 2 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT @take + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT @take + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.LinqService,False).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.LinqService,False).sql new file mode 100644 index 000000000000..b200a45b37ba --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 1 + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT @n + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.LinqService,True).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.LinqService,True).sql new file mode 100644 index 000000000000..b200a45b37ba --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.Classic.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 1 + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT @n + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.LinqService,False).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.LinqService,False).sql new file mode 100644 index 000000000000..0bb35ff8063f --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 +LIMIT 3 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.LinqService,True).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.LinqService,True).sql new file mode 100644 index 000000000000..d2fd8b0ee495 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.Classic.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 +LIMIT @take + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.LinqService,False).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.LinqService,False).sql new file mode 100644 index 000000000000..74bad3c7f439 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 +LIMIT 3 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.LinqService,True).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.LinqService,True).sql new file mode 100644 index 000000000000..18c59e6ee4d4 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.Classic.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 +LIMIT @take + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.LinqService,False).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.LinqService,False).sql new file mode 100644 index 000000000000..7a186edb9e6b --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT 3 + diff --git a/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.LinqService,True).sql b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.LinqService,True).sql new file mode 100644 index 000000000000..5dcc736967d3 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.Classic.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT @take + diff --git a/SQLite.Classic.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.Classic.LinqService).sql index 30ab6f4672ca..f11fa6c32b59 100644 --- a/SQLite.Classic.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.Classic.LinqService).sql @@ -1,19 +1,50 @@ BeforeExecute --- SQLite.Classic SQLite +-- SQLite.Classic SQLite (asynchronously) -DROP TABLE IF EXISTS [TestClass] +SELECT + MAX([x].[Value]) +FROM + [TestClass] [x] +WHERE + [x].[Id] = 0 BeforeExecute --- SQLite.Classic SQLite +-- SQLite.Classic SQLite (asynchronously) -CREATE TABLE IF NOT EXISTS [TestClass] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL -) +SELECT + MAX([x].[Value]) +FROM + [TestClass] [x] +WHERE + [x].[Id] = 0 BeforeExecute --- SQLite.Classic SQLite +-- SQLite.Classic SQLite (asynchronously) -DROP TABLE IF EXISTS [TestClass] +SELECT + MAX(CASE + WHEN [d].[Value] IS NOT NULL THEN [d].[Value] + ELSE 0 + END) +FROM + ( + SELECT + 1 as [c1] + ) [t1] + LEFT JOIN [TestClass] [d] ON [d].[Id] = 0 + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + MAX(CASE + WHEN [d].[Value] IS NOT NULL THEN [d].[Value] + ELSE 5 + END) +FROM + ( + SELECT + 1 as [c1] + ) [t1] + LEFT JOIN [TestClass] [d] ON [d].[Id] = 0 diff --git a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,False,False).sql b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,False,False).sql index 419948fdad1d..3d26bd261374 100644 --- a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,False,False).sql +++ b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,False,True).sql b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,False,True).sql index 419948fdad1d..3d26bd261374 100644 --- a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,False,True).sql +++ b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,True,False).sql b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,True,False).sql index 419948fdad1d..4d6d18c7de08 100644 --- a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,True,False).sql +++ b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,True,True).sql b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,True,True).sql index 419948fdad1d..4d6d18c7de08 100644 --- a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,True,True).sql +++ b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,False,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,False,False).sql b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,False,False).sql index 419948fdad1d..3d26bd261374 100644 --- a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,False,False).sql +++ b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,False,True).sql b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,False,True).sql index 419948fdad1d..3d26bd261374 100644 --- a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,False,True).sql +++ b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,True,False).sql b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,True,False).sql index 419948fdad1d..4d6d18c7de08 100644 --- a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,True,False).sql +++ b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,True,True).sql b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,True,True).sql index 419948fdad1d..4d6d18c7de08 100644 --- a/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,True,True).sql +++ b/SQLite.Classic.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.Classic.LinqService,True,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..84f21fba28c4 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(255) NULL, + [CreatedOn] DateTime2 NULL +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.Classic.LinqService).sql index 19081db6fede..f0bb6a047c78 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.Classic.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE IF NOT EXISTS [TempTable] +( + [ID] INTEGER NOT NULL +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SQLite.Classic SQLite SELECT @@ -7,3 +32,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..d0e0935fbace --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.Classic.LinqService).sql @@ -0,0 +1,87 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] +LIMIT 2 + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @ID -- Int32 +SET @ID = 1 + +DELETE FROM + [xxPerson] +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.LinqService,100).sql b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.LinqService,100).sql index b15b8b94f246..fd43c76938ec 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.LinqService,100).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.LinqService,100).sql @@ -10,3 +10,20 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.LinqService,200).sql b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.LinqService,200).sql index b15b8b94f246..fd43c76938ec 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.LinqService,200).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.Classic.LinqService,200).sql @@ -10,3 +10,20 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.LinqService,100).sql b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.LinqService,100).sql index d2e6d81cc903..cfe57f65343f 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.LinqService,100).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.LinqService,200).sql b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.LinqService,200).sql index d2e6d81cc903..cfe57f65343f 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.LinqService,200).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.Classic.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.LinqService,100).sql b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.LinqService,100).sql index b15b8b94f246..c57139d74714 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.LinqService,100).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.LinqService,200).sql b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.LinqService,200).sql index b15b8b94f246..a2da5e53bbca 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.LinqService,200).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.Classic.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,100).sql b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,100).sql index d2e6d81cc903..64c1465f479e 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,100).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,200).sql b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,200).sql index d2e6d81cc903..fc886a87f19e 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,200).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.LinqService,100).sql b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.LinqService,100).sql index b15b8b94f246..d715d81972e4 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.LinqService,100).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.LinqService,200).sql b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.LinqService,200).sql index b15b8b94f246..d715d81972e4 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.LinqService,200).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.Classic.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,100).sql b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,100).sql index d2e6d81cc903..298db7a1a2cd 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,100).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,200).sql b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,200).sql index d2e6d81cc903..298db7a1a2cd 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,200).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.Classic.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..f27da43b6dd7 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..221c72cfca82 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..221c72cfca82 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.Classic.LinqService).sql index 8860f8b9b7ca..0430651544fb 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.Classic.LinqService).sql @@ -1,5 +1,43 @@ BeforeExecute -- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) DECLARE @FirstName NVarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName NVarChar(4) -- String @@ -60,3 +98,32 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = 'Steven' AND [p].[LastName] = 'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.Classic.LinqService).sql index ee84461ea3e2..7e769a0f5a41 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.Classic.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id +LIMIT 2 + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..2d715b4fd7c3 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.Classic.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] INTEGER NOT NULL, + [Diagnosis] NVarChar(255) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY ([PersonID]) +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.Classic.LinqService).sql index ee84461ea3e2..f9169bd4c7d8 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.Classic.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 0 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 1 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 2 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id +LIMIT 2 + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.Classic.LinqService).sql index ee84461ea3e2..f9169bd4c7d8 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.Classic.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 0 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 1 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 2 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id +LIMIT 2 + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.Classic.LinqService).sql index b1837da6979b..e80826df20f6 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.Classic.LinqService).sql @@ -27,6 +27,21 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.Classic SQLite diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.Classic.LinqService).sql index b1837da6979b..e80826df20f6 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.Classic.LinqService).sql @@ -27,6 +27,21 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.Classic SQLite diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.Classic.LinqService).sql index 70732408557e..e234447b4d9a 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.Classic.LinqService).sql @@ -37,6 +37,23 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John0' + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.Classic SQLite (asynchronously) DECLARE @FirstName NVarChar(5) -- String @@ -68,6 +85,23 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John1' + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.Classic SQLite diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.LinqService,1).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.LinqService,1).sql index 381b32766a69..acf7cbcae8aa 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.LinqService,1).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic SQLite +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.LinqService,2).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.LinqService,2).sql index 381b32766a69..1be098eedc1c 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.LinqService,2).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.Classic.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic SQLite +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @Id -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,1).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,1).sql index 381b32766a69..5e3416b18e77 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,1).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic SQLite +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @value_1 -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,2).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,2).sql index 381b32766a69..c53d68d950f5 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,2).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic SQLite +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @value_1 -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.LinqService,100).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.LinqService,100).sql index 80b153e63389..d69a8e98804a 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.LinqService,100).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.Classic SQLite DECLARE @param -- Int32 SET @param = 100 diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.LinqService,200).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.LinqService,200).sql index 65f37e81ebf8..dc84db7cc4a0 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.LinqService,200).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.Classic.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.Classic SQLite DECLARE @param -- Int32 SET @param = 200 diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.LinqService,100).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.LinqService,100).sql index 938545fb22a6..41a8d5b8d19b 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.LinqService,100).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.Classic SQLite DECLARE @param -- Int32 SET @param = 100 diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.LinqService,200).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.LinqService,200).sql index fdfbea801101..034e80e97649 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.LinqService,200).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.Classic.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.Classic SQLite DECLARE @param -- Int32 SET @param = 200 diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.LinqService,1).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.LinqService,1).sql index 381b32766a69..9b51d9117ef6 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.LinqService,1).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic SQLite +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Id], + [Value], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.LinqService,2).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.LinqService,2).sql index 381b32766a69..70dde70ca062 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.LinqService,2).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.Classic.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic SQLite +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 2 +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Id], + [Value], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,1).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,1).sql index 381b32766a69..5e3416b18e77 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,1).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic SQLite +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @value_1 -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,2).sql b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,2).sql index 381b32766a69..c53d68d950f5 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,2).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.Classic.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.Classic SQLite +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @value_1 -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..81a9229d8d3b --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +UPDATE + [Parent] +SET + [ParentID] = [p2].[ParentID] +FROM + [Parent] [p2] +WHERE + [Parent].[ParentID] < 3 AND [Parent].[ParentID] = [p2].[ParentID] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..4c2c9921ca81 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..4c2c9921ca81 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..efdbdc3e2a6d --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +UPDATE + [Child] +SET + [ChildID] = [Child].[ChildID] + 1 +FROM + [Parent] [a_Parent] +WHERE + [Child].[ChildID] = @id AND [a_Parent].[Value1] = 1 AND + [Child].[ParentID] = [a_Parent].[ParentID] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..90e86df76ea2 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.Classic.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +UPDATE + [Parent] +SET + [Value1] = 5 +FROM + [Child] [child_1] +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [Parent].[ParentID] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..90e86df76ea2 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.Classic.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +UPDATE + [Parent] +SET + [Value1] = 5 +FROM + [Child] [child_1] +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [Parent].[ParentID] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.Classic.LinqService).sql new file mode 100644 index 000000000000..855aed3b2f21 --- /dev/null +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.Classic.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] +LIMIT 2 + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] +LIMIT 2 + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.Classic.LinqService).sql index a2a9d077b1d5..618403427430 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.Classic.LinqService).sql @@ -34,3 +34,60 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id +LIMIT 1 + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName NVarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName NVarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID -- Int32 +SET @ID = 5 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id +LIMIT 1 + diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.LinqService).sql index 58aa798d0b48..df5b7087caae 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [s].[Id], + [Value] = [s].[Value], + [ValueStr] = [s].[ValueStr] +FROM + [TableWithData] [s] +WHERE + [DestinationTable].[Id] = [s].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.LinqService).sql index 58aa798d0b48..860a83f3e32e 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [t1].[Id], + [Value] = [t1].[Value], + [ValueStr] = [t1].[ValueStr] +FROM + [TableWithData] [t1] +WHERE + [t1].[Id] = 3 AND [DestinationTable].[Id] = [t1].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.LinqService).sql index 58aa798d0b48..df5b7087caae 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.Classic.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [s].[Id], + [Value] = [s].[Value], + [ValueStr] = [s].[ValueStr] +FROM + [TableWithData] [s] +WHERE + [DestinationTable].[Id] = [s].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.LinqService).sql index 58aa798d0b48..860a83f3e32e 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.Classic.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [t1].[Id], + [Value] = [t1].[Value], + [ValueStr] = [t1].[ValueStr] +FROM + [TableWithData] [t1] +WHERE + [t1].[Id] = 3 AND [DestinationTable].[Id] = [t1].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.LinqService).sql index 12e2ae70c681..331079ca9c70 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.LinqService).sql index 12e2ae70c681..5c1cfa01854e 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.LinqService).sql index 12e2ae70c681..ffd0af94b9d7 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.Classic.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.LinqService).sql b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.LinqService).sql index 12e2ae70c681..e24473fd4290 100644 --- a/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.LinqService).sql +++ b/SQLite.Classic.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.Classic.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.Classic SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.Classic SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.Classic SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.Classic/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.Classic).sql b/SQLite.Classic/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.Classic).sql new file mode 100644 index 000000000000..2f1c45a28194 --- /dev/null +++ b/SQLite.Classic/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.Classic).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.Classic/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.Classic).sql b/SQLite.Classic/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.Classic).sql new file mode 100644 index 000000000000..7ab20ec4c022 --- /dev/null +++ b/SQLite.Classic/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.Classic).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.Classic/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.Classic).sql b/SQLite.Classic/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.Classic).sql new file mode 100644 index 000000000000..7ab20ec4c022 --- /dev/null +++ b/SQLite.Classic/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.Classic).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.Classic SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.MS.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..334bb4a4ac38 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(SQLite.MS.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [Person] [t1] + diff --git a/SQLite.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..22ffdc48ea74 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(SQLite.MS.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] <= 3 + ) + diff --git a/SQLite.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..66292ff603f5 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(SQLite.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT DISTINCT + [a_Parent1].[ParentID] + FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] + ) [m_1] + INNER JOIN ([Child] [d] + INNER JOIN [Parent] [a_Parent1_1] ON [d].[ParentID] = [a_Parent1_1].[ParentID]) + ON [m_1].[ParentID] = [a_Parent1_1].[ParentID] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [a_Parent1].[ParentID] +FROM + [Child] [t1] + INNER JOIN [Parent] [a_Parent1] ON [t1].[ParentID] = [a_Parent1].[ParentID] +GROUP BY + [a_Parent1].[ParentID] + diff --git a/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..c4e8d753e7d9 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(SQLite.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..ac7fd356953f --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(SQLite.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..c4e8d753e7d9 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(SQLite.MS.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..ac7fd356953f --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(SQLite.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] > 1 + diff --git a/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..c9f6924b1e3c --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(SQLite.MS.LinqService).sql @@ -0,0 +1,17 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @ID -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN @ID IN ( + SELECT + [t1].[PersonID] + FROM + [Person] [t1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..a5912cd10186 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(SQLite.MS.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[PersonID] = 1 +LIMIT 1 + diff --git a/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.MS.LinqService).sql index 097d576eb4ab..241a63f117e4 100644 --- a/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(SQLite.MS.LinqService).sql @@ -14,3 +14,19 @@ ORDER BY [t1].[ParentID] LIMIT @take OFFSET @skip +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 2 +DECLARE @skip -- Int32 +SET @skip = 1 + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +ORDER BY + [t1].[ParentID] +LIMIT @take OFFSET @skip + diff --git a/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..70e345253659 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(SQLite.MS.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 +DECLARE @p_1 -- Int32 +SET @p_1 = 2 +DECLARE @p_2 -- Int32 +SET @p_2 = 3 +DECLARE @param -- Int32 +SET @param = 4 + +SELECT + [o].[ParentID], + [o].[Value1] +FROM + [Parent] [o] +WHERE + [o].[ParentID] IN (@p, @p_1, @p_2) OR [o].[ParentID] = @param +LIMIT 1 + diff --git a/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..7a202fd88893 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(SQLite.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..7a202fd88893 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(SQLite.MS.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +ORDER BY + [t1].[ParentID], + [t1].[ChildID] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] + diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..442e3a9b2912 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(SQLite.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..442e3a9b2912 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(SQLite.MS.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + EXISTS( + SELECT + * + FROM + [Child] [c_1] + WHERE + [c_1].[ParentID] = @p + ) + diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..81a7efdb7cee --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(SQLite.MS.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = @p +ORDER BY + [x].[ParentID] DESC +LIMIT 1 + diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..c35da6afb77c --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(SQLite.MS.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT @p + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT @p + diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..3df8bc6f958f --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(SQLite.MS.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[ParentID] + FROM + [Child] [c_1] + ) + THEN 1 + ELSE 0 + END + diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..d4059a0359a3 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(SQLite.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..d4059a0359a3 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(SQLite.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..ab80f2b8b47b --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(SQLite.MS.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..ab80f2b8b47b --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(SQLite.MS.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + [c_1].[ParentID], + [c_1].[ChildID] +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p +LIMIT 1 + diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..481e22473f05 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(SQLite.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..481e22473f05 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(SQLite.MS.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = -1 + +SELECT + MAX([c_1].[ParentID]) +FROM + [Child] [c_1] +WHERE + [c_1].[ParentID] = @p + diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..2ce098f3720f 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + NOT EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] <> @p + ) diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..e35fec98c7e6 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ) diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..e35fec98c7e6 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,15 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + EXISTS( + SELECT + * + FROM + [AsyncDataTable] [c_1] + WHERE + [c_1].[Id] = @p + ) diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.MS.LinqService).sql index 6844a9e8f9c5..576df5de63cb 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + AVG(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..e20dd3fc956e 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,17 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + CASE + WHEN @p IN ( + SELECT + [c_1].[Id] + FROM + [AsyncDataTable] [c_1] + ) + THEN 1 + ELSE 0 + END diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..4a6979f97a7b 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..4a6979f97a7b 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..7a0fbdae74e0 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..7a0fbdae74e0 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..7a0fbdae74e0 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..7a0fbdae74e0 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 1 diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..4a6979f97a7b 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..4a6979f97a7b 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..32ad53e49d16 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..32ad53e49d16 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MAX([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..3727103a6319 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..3727103a6319 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + MIN([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] > @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..a9374faef87c 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..a9374faef87c 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..a9374faef87c 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.MS.LinqService).sql index 6844a9e8f9c5..a9374faef87c 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(SQLite.MS.LinqService).sql @@ -1,160 +1,14 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 2 + +SELECT + @p, + [c_1].[Id] +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] = @p +LIMIT 2 diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.MS.LinqService).sql index 6844a9e8f9c5..01dfb9424090 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.MS.LinqService).sql index 6844a9e8f9c5..01dfb9424090 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.MS.LinqService).sql index 6844a9e8f9c5..627437098eb0 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.MS.LinqService).sql index 6844a9e8f9c5..627437098eb0 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.MS.LinqService).sql index 6844a9e8f9c5..04ed7deb9bcb 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.MS.LinqService).sql index 6844a9e8f9c5..04ed7deb9bcb 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.MS.LinqService).sql index 6844a9e8f9c5..f4d6781fd582 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.MS.LinqService).sql index 6844a9e8f9c5..f4d6781fd582 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.MS.LinqService).sql index 6844a9e8f9c5..88556905f4f8 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.MS.LinqService).sql index 6844a9e8f9c5..88556905f4f8 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.MS.LinqService).sql index 6844a9e8f9c5..01dfb9424090 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.MS.LinqService).sql index 6844a9e8f9c5..01dfb9424090 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Decimal)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.MS.LinqService).sql index 6844a9e8f9c5..627437098eb0 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.MS.LinqService).sql index 6844a9e8f9c5..627437098eb0 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Float)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.MS.LinqService).sql index 6844a9e8f9c5..04ed7deb9bcb 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.MS.LinqService).sql index 6844a9e8f9c5..04ed7deb9bcb 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS Real)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.MS.LinqService).sql index 6844a9e8f9c5..f4d6781fd582 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.MS.LinqService).sql index 6844a9e8f9c5..f4d6781fd582 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM([c_1].[Id]) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.MS.LinqService).sql index 6844a9e8f9c5..88556905f4f8 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.MS.LinqService).sql index 6844a9e8f9c5..88556905f4f8 100644 --- a/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.MS.LinqService).sql @@ -1,160 +1,12 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [AsyncDataTable] -( - [Id] INTEGER NOT NULL, - - CONSTRAINT [PK_AsyncDataTable] PRIMARY KEY ([Id]) -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 10 - -INSERT INTO [AsyncDataTable] -( - [Id] -) -VALUES -( - @Id -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [AsyncDataTable] +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 5 + +SELECT + SUM(CAST([c_1].[Id] AS BigInt)) +FROM + [AsyncDataTable] [c_1] +WHERE + [c_1].[Id] < @p diff --git a/SQLite.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..4607d8623619 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(SQLite.MS.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] = 1 +UNION ALL +SELECT + [p_1].[ParentID], + [p_1].[Value1] +FROM + [Parent] [p_1] +WHERE + [p_1].[ParentID] = 2 + diff --git a/SQLite.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.MS.LinqService).sql index 892b9134ed5f..fede2b7de85b 100644 --- a/SQLite.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(SQLite.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyAutoIncrement] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SQLite.MS SQLite SELECT @@ -8,6 +30,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.MS SQLite @@ -18,6 +57,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.MS SQLite @@ -28,6 +84,23 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +UPDATE + [ConcurrencyAutoIncrement] +SET + [Stamp] = [ConcurrencyAutoIncrement].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.MS SQLite @@ -38,6 +111,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyAutoIncrement] +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.MS SQLite @@ -48,6 +133,18 @@ SELECT FROM [ConcurrencyAutoIncrement] [t1] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -8 + +DELETE FROM + [ConcurrencyAutoIncrement] +WHERE + [ConcurrencyAutoIncrement].[Id] = @Id AND [ConcurrencyAutoIncrement].[Stamp] = @Stamp + BeforeExecute -- SQLite.MS SQLite diff --git a/SQLite.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.MS.LinqService).sql index d2386bed9a6c..a118369db712 100644 --- a/SQLite.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(SQLite.MS.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 +DECLARE @Value NVarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO [ConcurrencyFiltered] +( + [Id], + [Stamp], + [Value] +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- SQLite.MS SQLite SELECT @@ -8,6 +30,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.MS SQLite @@ -18,6 +58,24 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @Value NVarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -10 + +UPDATE + [ConcurrencyFiltered] +SET + [Stamp] = [ConcurrencyFiltered].[Stamp] + 1, + [Value] = @Value +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.MS SQLite @@ -28,6 +86,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] +WHERE + [ConcurrencyFiltered].[Id] = 2 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.MS SQLite @@ -38,6 +109,19 @@ SELECT FROM [ConcurrencyFiltered] [t1] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Stamp -- Int32 +SET @Stamp = -9 + +DELETE FROM + [ConcurrencyFiltered] +WHERE + [ConcurrencyFiltered].[Id] = 1 AND [ConcurrencyFiltered].[Id] = @Id AND + [ConcurrencyFiltered].[Stamp] = @Stamp + BeforeExecute -- SQLite.MS SQLite diff --git a/SQLite.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..244512cc5752 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(SQLite.MS.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [t1] + diff --git a/SQLite.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..b57edcdb3633 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(SQLite.MS.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 2 + diff --git a/SQLite.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..b52f0d08e582 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(SQLite.MS.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + [Child] [c_1] + LEFT JOIN [Parent] [a_Parent] ON [c_1].[ParentID] = [a_Parent].[ParentID] + WHERE + [a_Parent].[ParentID] = [t1].[ParentID] + )) +FROM + [Parent] [t1] + diff --git a/SQLite.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.MS.LinqService).sql index 70f9b19c8477..f99ba83744a5 100644 --- a/SQLite.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(SQLite.MS.LinqService).sql @@ -1,37 +1,11 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [DynamicParent] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [DynamicParent] -( - [ID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [DynamicChild] -( - [ID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - [ParentID] INTEGER NOT NULL -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [DynamicChild] - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [DynamicParent] +-- SQLite.MS SQLite (asynchronously) + +SELECT + [it].[ID] +FROM + [DynamicParent] [it] + LEFT JOIN [DynamicChild] [a_Child] ON [it].[ID] = [a_Child].[ParentID] +WHERE + [a_Child].[ID] = 123 diff --git a/SQLite.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.MS.LinqService).sql index fd44ffad5694..d50e511d2649 100644 --- a/SQLite.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(SQLite.MS.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + LIMIT 1 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 +LIMIT 1 + +BeforeExecute BeginTransactionAsync(Serializable) BeforeExecute -- SQLite.MS SQLite (asynchronously) diff --git a/SQLite.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.MS.LinqService).sql index 9af5ea83b69b..eb1666b3769d 100644 --- a/SQLite.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(SQLite.MS.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [m_1].[ParentID], + [d].[ParentID], + [d].[ChildID] +FROM + ( + SELECT + [x].[ParentID] + FROM + [Parent] [x] + WHERE + [x].[ParentID] = 3 + LIMIT 1 + ) [m_1] + INNER JOIN [Child] [d] ON [m_1].[ParentID] = [d].[ParentID] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [x].[ParentID], + [x].[Value1] +FROM + [Parent] [x] +WHERE + [x].[ParentID] = 3 +LIMIT 1 + +BeforeExecute BeginTransaction BeforeExecute -- SQLite.MS SQLite (asynchronously) diff --git a/SQLite.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..2519b394d1af --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(SQLite.MS.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + [Child] [a_Children] + INNER JOIN [GrandChild] [a_GrandChildren] ON [a_Children].[ParentID] = [a_GrandChildren].[ParentID] AND [a_Children].[ChildID] = [a_GrandChildren].[ChildID] + WHERE + [p].[ParentID] = [a_Children].[ParentID] + ) +FROM + [Parent] [p] + diff --git a/SQLite.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..80c6a4f339f5 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(SQLite.MS.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] +WHERE + [t1].[Value1] = 1 + diff --git a/SQLite.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..65eb2a0f52f9 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(SQLite.MS.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT DISTINCT + [p1].[PersonID], + [p1].[Gender], + [p1].[FirstName], + [p1].[LastName] +FROM + [Person] [p1] +WHERE + [p1].[PersonID] IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + [p1].[Gender] = 'F' + diff --git a/SQLite.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..074ad370dbe9 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(SQLite.MS.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + 1 + diff --git a/SQLite.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..ff885f7913fe --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(SQLite.MS.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [x].[MiddleName], + COUNT(*) +FROM + [Person] [x] +WHERE + [x].[MiddleName] IS NOT NULL +GROUP BY + [x].[MiddleName] +UNION ALL +SELECT + [x_1].[MiddleName], + COUNT(*) +FROM + [Person] [x_1] +WHERE + [x_1].[MiddleName] IS NOT NULL +GROUP BY + [x_1].[MiddleName] +UNION ALL +SELECT + [x_2].[MiddleName], + COUNT(*) +FROM + [Person] [x_2] +WHERE + [x_2].[MiddleName] IS NOT NULL +GROUP BY + [x_2].[MiddleName] +UNION ALL +SELECT + [x_3].[MiddleName], + COUNT(*) +FROM + [Person] [x_3] +WHERE + [x_3].[MiddleName] IS NOT NULL +GROUP BY + [x_3].[MiddleName] +UNION ALL +SELECT + [x_4].[MiddleName], + COUNT(*) +FROM + [Person] [x_4] +WHERE + [x_4].[MiddleName] IS NOT NULL +GROUP BY + [x_4].[MiddleName] +UNION ALL +SELECT + [x_5].[MiddleName], + COUNT(*) +FROM + [Person] [x_5] +WHERE + [x_5].[MiddleName] IS NOT NULL +GROUP BY + [x_5].[MiddleName] +UNION ALL +SELECT + [x_6].[MiddleName], + COUNT(*) +FROM + [Person] [x_6] +WHERE + [x_6].[MiddleName] IS NOT NULL +GROUP BY + [x_6].[MiddleName] +UNION ALL +SELECT + [x_7].[MiddleName], + COUNT(*) +FROM + [Person] [x_7] +WHERE + [x_7].[MiddleName] IS NOT NULL +GROUP BY + [x_7].[MiddleName] +UNION ALL +SELECT + [x_8].[MiddleName], + COUNT(*) +FROM + [Person] [x_8] +WHERE + [x_8].[MiddleName] IS NOT NULL +GROUP BY + [x_8].[MiddleName] +UNION ALL +SELECT + [x_9].[MiddleName], + COUNT(*) +FROM + [Person] [x_9] +WHERE + [x_9].[MiddleName] IS NOT NULL +GROUP BY + [x_9].[MiddleName] +UNION ALL +SELECT + [x_10].[MiddleName], + COUNT(*) +FROM + [Person] [x_10] +WHERE + [x_10].[MiddleName] IS NOT NULL +GROUP BY + [x_10].[MiddleName] +UNION ALL +SELECT + [x_11].[MiddleName], + COUNT(*) +FROM + [Person] [x_11] +WHERE + [x_11].[MiddleName] IS NOT NULL +GROUP BY + [x_11].[MiddleName] +UNION ALL +SELECT + [x_12].[MiddleName], + COUNT(*) +FROM + [Person] [x_12] +WHERE + [x_12].[MiddleName] IS NOT NULL +GROUP BY + [x_12].[MiddleName] +UNION ALL +SELECT + [x_13].[MiddleName], + COUNT(*) +FROM + [Person] [x_13] +WHERE + [x_13].[MiddleName] IS NOT NULL +GROUP BY + [x_13].[MiddleName] +UNION ALL +SELECT + [x_14].[MiddleName], + COUNT(*) +FROM + [Person] [x_14] +WHERE + [x_14].[MiddleName] IS NOT NULL +GROUP BY + [x_14].[MiddleName] +UNION ALL +SELECT + [x_15].[MiddleName], + COUNT(*) +FROM + [Person] [x_15] +WHERE + [x_15].[MiddleName] IS NOT NULL +GROUP BY + [x_15].[MiddleName] +UNION ALL +SELECT + [x_16].[MiddleName], + COUNT(*) +FROM + [Person] [x_16] +WHERE + [x_16].[MiddleName] IS NOT NULL +GROUP BY + [x_16].[MiddleName] +UNION ALL +SELECT + [x_17].[MiddleName], + COUNT(*) +FROM + [Person] [x_17] +WHERE + [x_17].[MiddleName] IS NOT NULL +GROUP BY + [x_17].[MiddleName] +UNION ALL +SELECT + [x_18].[MiddleName], + COUNT(*) +FROM + [Person] [x_18] +WHERE + [x_18].[MiddleName] IS NOT NULL +GROUP BY + [x_18].[MiddleName] +UNION ALL +SELECT + [x_19].[MiddleName], + COUNT(*) +FROM + [Person] [x_19] +WHERE + [x_19].[MiddleName] IS NOT NULL +GROUP BY + [x_19].[MiddleName] +UNION ALL +SELECT + [x_20].[MiddleName], + COUNT(*) +FROM + [Person] [x_20] +WHERE + [x_20].[MiddleName] IS NOT NULL +GROUP BY + [x_20].[MiddleName] + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.MS.LinqService,False).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.MS.LinqService,False).sql new file mode 100644 index 000000000000..d5ba1441ec5b --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.MS.LinqService,True).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.MS.LinqService,True).sql new file mode 100644 index 000000000000..d5ba1441ec5b --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(SQLite.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.MS.LinqService,False).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.MS.LinqService,False).sql new file mode 100644 index 000000000000..d5ba1441ec5b --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.MS.LinqService,False).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.MS.LinqService,True).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.MS.LinqService,True).sql new file mode 100644 index 000000000000..d5ba1441ec5b --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(SQLite.MS.LinqService,True).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 3 + +SELECT + [p].[ParentID], + [p].[Value1] +FROM + [Parent] [p] +WHERE + [p].[ParentID] > 1 +ORDER BY + [p].[ParentID] +LIMIT 1 OFFSET @n + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.MS.LinqService).sql index 9eb0d72156dd..e2c437d4911d 100644 --- a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(SQLite.MS.LinqService).sql @@ -1,74 +1,10 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TakeSkipClass] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TakeSkipClass] -( - [Value] VarChar(10) NULL -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PIPPO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'PLUTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Value VarChar(5) -- AnsiString -SET @Value = 'BOLTO' - -INSERT INTO [TakeSkipClass] -( - [Value] -) -VALUES -( - @Value -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TakeSkipClass] +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[Value] +FROM + [TakeSkipClass] [t1] +ORDER BY + [t1].[Value] diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.MS.LinqService,False).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.MS.LinqService,False).sql index fa7d9cd63a18..916844051df6 100644 --- a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.MS.LinqService,False).sql +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.MS.LinqService,False).sql @@ -18,3 +18,23 @@ FROM [Child] [ch] LIMIT 3 +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT 2 + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT 3 + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.MS.LinqService,True).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.MS.LinqService,True).sql index ebac0dfc3ef7..6fb6957f9de5 100644 --- a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.MS.LinqService,True).sql +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(SQLite.MS.LinqService,True).sql @@ -22,3 +22,27 @@ FROM [Child] [ch] LIMIT @take +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 2 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT @take + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +LIMIT @take + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.MS.LinqService,False).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.MS.LinqService,False).sql new file mode 100644 index 000000000000..d300ba8a92ab --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.MS.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 1 + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT @n + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.MS.LinqService,True).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.MS.LinqService,True).sql new file mode 100644 index 000000000000..d300ba8a92ab --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(SQLite.MS.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @n -- Int32 +SET @n = 1 + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT @n + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.MS.LinqService,False).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.MS.LinqService,False).sql new file mode 100644 index 000000000000..93c57070ccf6 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.MS.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 +LIMIT 3 + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.MS.LinqService,True).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.MS.LinqService,True).sql new file mode 100644 index 000000000000..3fa75d2a5c37 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(SQLite.MS.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] > 3 OR [ch].[ChildID] < 4 +LIMIT @take + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.MS.LinqService,False).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.MS.LinqService,False).sql new file mode 100644 index 000000000000..6b145afac00e --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.MS.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 +LIMIT 3 + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.MS.LinqService,True).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.MS.LinqService,True).sql new file mode 100644 index 000000000000..244a25b22767 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(SQLite.MS.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [ch].[ParentID], + [ch].[ChildID] +FROM + [Child] [ch] +WHERE + [ch].[ChildID] >= 0 AND [ch].[ChildID] <= 100 +LIMIT @take + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.MS.LinqService,False).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.MS.LinqService,False).sql new file mode 100644 index 000000000000..bd317fbdc9f6 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.MS.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT 3 + diff --git a/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.MS.LinqService,True).sql b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.MS.LinqService,True).sql new file mode 100644 index 000000000000..60b96d864f7e --- /dev/null +++ b/SQLite.MS.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(SQLite.MS.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @take -- Int32 +SET @take = 3 + +SELECT + [t1].[ParentID], + [t1].[ChildID] +FROM + [Child] [t1] +LIMIT @take + diff --git a/SQLite.MS.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.MS.LinqService).sql index e24f99783c53..089feb48fd60 100644 --- a/SQLite.MS.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/UserTests/Issue2588Tests/Tests.UserTests.Issue2588Tests.AggregationWithNull(SQLite.MS.LinqService).sql @@ -1,19 +1,50 @@ BeforeExecute --- SQLite.MS SQLite +-- SQLite.MS SQLite (asynchronously) -DROP TABLE IF EXISTS [TestClass] +SELECT + MAX([x].[Value]) +FROM + [TestClass] [x] +WHERE + [x].[Id] = 0 BeforeExecute --- SQLite.MS SQLite +-- SQLite.MS SQLite (asynchronously) -CREATE TABLE IF NOT EXISTS [TestClass] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL -) +SELECT + MAX([x].[Value]) +FROM + [TestClass] [x] +WHERE + [x].[Id] = 0 BeforeExecute --- SQLite.MS SQLite +-- SQLite.MS SQLite (asynchronously) -DROP TABLE IF EXISTS [TestClass] +SELECT + MAX(CASE + WHEN [d].[Value] IS NOT NULL THEN [d].[Value] + ELSE 0 + END) +FROM + ( + SELECT + 1 as [c1] + ) [t1] + LEFT JOIN [TestClass] [d] ON [d].[Id] = 0 + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + MAX(CASE + WHEN [d].[Value] IS NOT NULL THEN [d].[Value] + ELSE 5 + END) +FROM + ( + SELECT + 1 as [c1] + ) [t1] + LEFT JOIN [TestClass] [d] ON [d].[Id] = 0 diff --git a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,False,False).sql b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,False,False).sql index 8ea673ea0cd7..273225bc74eb 100644 --- a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,False,False).sql +++ b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,False,True).sql b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,False,True).sql index 8ea673ea0cd7..273225bc74eb 100644 --- a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,False,True).sql +++ b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,True,False).sql b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,True,False).sql index 8ea673ea0cd7..751cdc18fab9 100644 --- a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,True,False).sql +++ b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,True,True).sql b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,True,True).sql index 8ea673ea0cd7..751cdc18fab9 100644 --- a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,True,True).sql +++ b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,False,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,False,False).sql b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,False,False).sql index 8ea673ea0cd7..273225bc74eb 100644 --- a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,False,False).sql +++ b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,False,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,False,True).sql b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,False,True).sql index 8ea673ea0cd7..273225bc74eb 100644 --- a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,False,True).sql +++ b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,False,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +CREATE TABLE [Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,True,False).sql b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,True,False).sql index 8ea673ea0cd7..751cdc18fab9 100644 --- a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,True,False).sql +++ b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,True,False).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,True,True).sql b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,True,True).sql index 8ea673ea0cd7..751cdc18fab9 100644 --- a/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,True,True).sql +++ b/SQLite.MS.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(SQLite.MS.LinqService,True,True,True).sql @@ -3,3 +3,19 @@ DROP TABLE IF EXISTS [Issue681Table2] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +CREATE TABLE [main].[Issue681Table2] +( + [ID] INTEGER NOT NULL, + [Value] INTEGER NOT NULL, + + CONSTRAINT [PK_Issue681Table2] PRIMARY KEY ([ID]) +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [Issue681Table2] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..04f5ff445127 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(SQLite.MS.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [TestTable] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +CREATE TABLE [TestTable] +( + [ID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [Field1] NVarChar(50) NULL, + [Field2] NVarChar(255) NULL, + [CreatedOn] DateTime2 NULL +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ID], + [t1].[Field1], + [t1].[Field2], + [t1].[CreatedOn] +FROM + [TestTable] [t1] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE [TestTable] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.MS.LinqService).sql index 36972404b89d..a94cc3471cea 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(SQLite.MS.LinqService).sql @@ -1,4 +1,29 @@ BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +CREATE TABLE IF NOT EXISTS [TempTable] +( + [ID] INTEGER NOT NULL +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +INSERT INTO [TempTable] +( + [ID] +) +SELECT + [p].[ParentID] +FROM + [Parent] [p] + +BeforeExecute -- SQLite.MS SQLite SELECT @@ -7,3 +32,8 @@ FROM [Parent] [p] INNER JOIN [TempTable] [t] ON [p].[ParentID] = [t].[ID] +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [TempTable] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..1815f5f407d8 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(SQLite.MS.LinqService).sql @@ -0,0 +1,87 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] +LIMIT 2 + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @ID -- Int32 +SET @ID = 1 + +DELETE FROM + [xxPerson] +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.MS.LinqService,100).sql b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.MS.LinqService,100).sql index 1b6c0fa4dede..4276f5dea8a1 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.MS.LinqService,100).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.MS.LinqService,100).sql @@ -10,3 +10,20 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.MS.LinqService,200).sql b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.MS.LinqService,200).sql index 1b6c0fa4dede..4276f5dea8a1 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.MS.LinqService,200).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTest(SQLite.MS.LinqService,200).sql @@ -10,3 +10,20 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [TableWithData] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.MS.LinqService,100).sql b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.MS.LinqService,100).sql index 44310bfe0ac5..79d330672e86 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.MS.LinqService,100).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.MS.LinqService,100).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.MS.LinqService,200).sql b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.MS.LinqService,200).sql index 44310bfe0ac5..79d330672e86 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.MS.LinqService,200).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputAsyncTestSingleRecord(SQLite.MS.LinqService,200).sql @@ -10,3 +10,15 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.MS.LinqService,100).sql b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.MS.LinqService,100).sql index 1b6c0fa4dede..a3b919f54ffb 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.MS.LinqService,100).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.MS.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.MS.LinqService,200).sql b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.MS.LinqService,200).sql index 1b6c0fa4dede..b93a6ac2203d 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.MS.LinqService,200).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTest(SQLite.MS.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,100).sql b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,100).sql index 44310bfe0ac5..7c56408ec681 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,100).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,100).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,200).sql b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,200).sql index 44310bfe0ac5..214f6d7927c9 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,200).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,200).sql @@ -10,3 +10,17 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + @param, + [TableWithData].[Value] + @param, + [TableWithData].[ValueStr] || @param + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.MS.LinqService,100).sql b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.MS.LinqService,100).sql index 1b6c0fa4dede..604a63fdd1c0 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.MS.LinqService,100).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.MS.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.MS.LinqService,200).sql b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.MS.LinqService,200).sql index 1b6c0fa4dede..604a63fdd1c0 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.MS.LinqService,200).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTest(SQLite.MS.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] > 3 +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,100).sql b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,100).sql index 44310bfe0ac5..d8e260d0235a 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,100).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,100).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,200).sql b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,200).sql index 44310bfe0ac5..d8e260d0235a 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,200).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/DeleteWithOutputTests/Tests.xUpdate.DeleteWithOutputTests.DeleteWithOutputProjectionFromQueryAsyncTestSingleRecord(SQLite.MS.LinqService,200).sql @@ -10,3 +10,14 @@ FROM WHERE [s].[Id] = 3 +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [TableWithData] +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Id] + 1, + [TableWithData].[ValueStr] || 1 + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..4dd9c928d46a --- /dev/null +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(SQLite.MS.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..f9c85ea0d0a7 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(SQLite.MS.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..f9c85ea0d0a7 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(SQLite.MS.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +SELECT + [c_1].[ParentID], + @id +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = 11 + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DELETE FROM + [Child] +WHERE + [Child].[ChildID] > 1000 + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.MS.LinqService).sql index 325500f10c6e..7026cb693b1b 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(SQLite.MS.LinqService).sql @@ -1,5 +1,43 @@ BeforeExecute -- SQLite.MS SQLite (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) DECLARE @FirstName NVarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName NVarChar(4) -- String @@ -60,3 +98,32 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [p] +WHERE + [p].[FirstName] = 'Steven' AND [p].[LastName] = 'King' AND + [p].[Gender] = 'M' + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE [xxPerson] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.MS.LinqService).sql index 5011bf5c0147..66ac32933638 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(SQLite.MS.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc0' + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc1' + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'abc2' + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id +LIMIT 2 + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..ed2a948a536d --- /dev/null +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(SQLite.MS.LinqService).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +CREATE TABLE [xxPatient] +( + [PersonID] INTEGER NOT NULL, + [Diagnosis] NVarChar(255) NULL, + + CONSTRAINT [PK_xxPatient] PRIMARY KEY ([PersonID]) +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC1' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @PersonID -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis NVarChar(4) -- String +SET @Diagnosis = 'ABC2' + +INSERT INTO [xxPatient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @PersonID, + @Diagnosis +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = @Diagnosis + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPatient] [t1] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPatient] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.MS.LinqService).sql index 5011bf5c0147..b8b14f9c6243 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(SQLite.MS.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 0 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 1 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 2 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id +LIMIT 2 + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.MS.LinqService).sql index 5011bf5c0147..b8b14f9c6243 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(SQLite.MS.LinqService).sql @@ -34,3 +34,77 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 0 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 1 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 +DECLARE @i -- Int32 +SET @i = 2 + +INSERT INTO [Patient] AS [t1] +( + [PersonID], + [Diagnosis] +) +VALUES +( + @id, + 'abc' +) +ON CONFLICT ([PersonID]) DO UPDATE SET + [Diagnosis] = CAST(Length([t1].[Diagnosis]) + @i AS NVarChar(11)) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 5 + +SELECT + [p].[PersonID], + [p].[Diagnosis] +FROM + [Patient] [p] +WHERE + [p].[PersonID] = @id +LIMIT 2 + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.MS.LinqService).sql index 9c381a88218c..6805325483ff 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(SQLite.MS.LinqService).sql @@ -27,6 +27,21 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.MS SQLite diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.MS.LinqService).sql index 9c381a88218c..6805325483ff 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(SQLite.MS.LinqService).sql @@ -27,6 +27,21 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = 'John' AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.MS SQLite diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.MS.LinqService).sql index fd9590c5c43b..bf264a79ad62 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(SQLite.MS.LinqService).sql @@ -37,6 +37,23 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John0' + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.MS SQLite (asynchronously) DECLARE @FirstName NVarChar(5) -- String @@ -68,6 +85,23 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p NVarChar(5) -- String +SET @p = 'John1' + +SELECT + [p].[FirstName], + [p].[PersonID], + [p].[LastName], + [p].[MiddleName], + [p].[Gender] +FROM + [Person] [p] +WHERE + [p].[FirstName] = @p AND [p].[LastName] = 'Shepard' +LIMIT 2 + BeforeExecute -- SQLite.MS SQLite diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.MS.LinqService,1).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.MS.LinqService,1).sql index 8513c693e882..5a3c6af0ea5c 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.MS.LinqService,1).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.MS.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.MS SQLite +-- SQLite.MS SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.MS.LinqService,2).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.MS.LinqService,2).sql index 8513c693e882..5a871868abef 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.MS.LinqService,2).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjAsyncTest(SQLite.MS.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.MS SQLite +-- SQLite.MS SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @Id -- Int32 +SET @Id = 2 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @Id, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,1).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,1).sql index 8513c693e882..006d0fff9df2 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,1).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.MS SQLite +-- SQLite.MS SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @value_1 -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,2).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,2).sql index 8513c693e882..fb9203fb8ad7 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,2).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertIValueInsertableWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.MS SQLite +-- SQLite.MS SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @value_1 -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.MS.LinqService,100).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.MS.LinqService,100).sql index 5185fa158090..a3ef85fd9b73 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.MS.LinqService,100).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.MS SQLite DECLARE @param -- Int32 SET @param = 100 diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.MS.LinqService,200).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.MS.LinqService,200).sql index c37e86e4ec92..dfeceb3d03d9 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.MS.LinqService,200).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsync(SQLite.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] > 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.MS SQLite DECLARE @param -- Int32 SET @param = 200 diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.MS.LinqService,100).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.MS.LinqService,100).sql index e55dbc73ec07..2dfe056be170 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.MS.LinqService,100).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.MS.LinqService,100).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 100 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.MS SQLite DECLARE @param -- Int32 SET @param = 100 diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.MS.LinqService,200).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.MS.LinqService,200).sql index 3a88b23327da..2bb501a209af 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.MS.LinqService,200).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputFromQueryTestAsyncSingleRecord(SQLite.MS.LinqService,200).sql @@ -1,4 +1,28 @@ BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @param -- Int32 +SET @param = 200 + +INSERT INTO [DestinationTable] +( + [Id], + [Value], + [ValueStr] +) +SELECT + [s].[Id] + @param, + [s].[Value] + @param, + [s].[ValueStr] || @param +FROM + [TableWithData] [s] +WHERE + [s].[Id] = 3 +RETURNING + [DestinationTable].[Id], + [DestinationTable].[Value], + [DestinationTable].[ValueStr] + +BeforeExecute -- SQLite.MS SQLite DECLARE @param -- Int32 SET @param = 200 diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.MS.LinqService,1).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.MS.LinqService,1).sql index 8513c693e882..1291393d2cb7 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.MS.LinqService,1).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.MS.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.MS SQLite +-- SQLite.MS SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 1 +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Id], + [Value], + [ValueStr] ) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.MS.LinqService,2).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.MS.LinqService,2).sql index 8513c693e882..1e056058edc0 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.MS.LinqService,2).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjAsyncTest(SQLite.MS.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.MS SQLite +-- SQLite.MS SQLite (asynchronously) +DECLARE @Id -- Int32 +SET @Id = 2 +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Id], + [Value], + [ValueStr] ) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Id, + @Value, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,1).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,1).sql index 8513c693e882..006d0fff9df2 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,1).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,1).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.MS SQLite +-- SQLite.MS SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 100 +DECLARE @value_1 -- Int32 +SET @value_1 = 1 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr1' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,2).sql b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,2).sql index 8513c693e882..fb9203fb8ad7 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,2).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/InsertWithOutputTests/Tests.xUpdate.InsertWithOutputTests.InsertWithOutputObjWithSetterAsyncTest(SQLite.MS.LinqService,2).sql @@ -1,20 +1,26 @@ BeforeExecute --- SQLite.MS SQLite +-- SQLite.MS SQLite (asynchronously) +DECLARE @Value -- Int32 +SET @Value = 200 +DECLARE @value_1 -- Int32 +SET @value_1 = 2 +DECLARE @ValueStr NVarChar(8) -- String +SET @ValueStr = 'SomeStr2' -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] +INSERT INTO [TableWithData] ( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL + [Value], + [Id], + [ValueStr] ) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +VALUES +( + @Value, + @value_1, + @ValueStr +) +RETURNING + [TableWithData].[Id], + [TableWithData].[Value], + [TableWithData].[ValueStr] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..983f4c375380 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update12Async(SQLite.MS.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +UPDATE + [Parent] +SET + [ParentID] = [p2].[ParentID] +FROM + [Parent] [p2] +WHERE + [Parent].[ParentID] < 3 AND [Parent].[ParentID] = [p2].[ParentID] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..c28986865d8c --- /dev/null +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(SQLite.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..c28986865d8c --- /dev/null +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(SQLite.MS.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 -- Int32 +SET @Value1 = 1001 + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @ParentID -- Int32 +SET @ParentID = 1001 + +UPDATE + [Parent] +SET + [ParentID] = [Parent].[ParentID] + 1 +WHERE + [Parent].[ParentID] = @ParentID + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Parent] [p] +WHERE + [p].[ParentID] = @p + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..75c7651ba9b0 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(SQLite.MS.LinqService).sql @@ -0,0 +1,55 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +INSERT INTO [Child] +( + [ParentID], + [ChildID] +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @id + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 1001 + +UPDATE + [Child] +SET + [ChildID] = [Child].[ChildID] + 1 +FROM + [Parent] [a_Parent] +WHERE + [Child].[ChildID] = @id AND [a_Parent].[Value1] = 1 AND + [Child].[ParentID] = [a_Parent].[ParentID] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @p -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + [Child] [c_1] +WHERE + [c_1].[ChildID] = @p + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..524442cf482d --- /dev/null +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(SQLite.MS.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +UPDATE + [Parent] +SET + [Value1] = 5 +FROM + [Child] [child_1] +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [Parent].[ParentID] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..524442cf482d --- /dev/null +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(SQLite.MS.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +INSERT INTO [Parent] +( + [ParentID], + [Value1] +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +INSERT INTO [Child] +( + [ChildID], + [ParentID] +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +UPDATE + [Parent] +SET + [Value1] = 5 +FROM + [Child] [child_1] +WHERE + [child_1].[ChildID] = 10000 AND [child_1].[ParentID] = [Parent].[ParentID] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.MS.LinqService).sql new file mode 100644 index 000000000000..1d5ec87e5903 --- /dev/null +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(SQLite.MS.LinqService).sql @@ -0,0 +1,105 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE IF EXISTS [xxPerson] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +CREATE TABLE [xxPerson] +( + [FirstName] NVarChar(255) NOT NULL, + [PersonID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [LastName] NVarChar(255) NOT NULL, + [MiddleName] NVarChar(255) NULL, + [Gender] Char(1) NOT NULL +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' + +INSERT INTO [xxPerson] +( + [FirstName], + [LastName], + [MiddleName], + [Gender] +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + COUNT(*) +FROM + [xxPerson] [t1] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] +LIMIT 2 + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @FirstName NVarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName NVarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName NVarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- AnsiStringFixedLength +SET @Gender = 'M' +DECLARE @ID -- Int32 +SET @ID = 1 + +UPDATE + [xxPerson] +SET + [FirstName] = @FirstName, + [LastName] = @LastName, + [MiddleName] = @MiddleName, + [Gender] = @Gender +WHERE + [xxPerson].[PersonID] = @ID + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[FirstName], + [t1].[PersonID], + [t1].[LastName], + [t1].[MiddleName], + [t1].[Gender] +FROM + [xxPerson] [t1] +LIMIT 2 + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +DROP TABLE [xxPerson] + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.MS.LinqService).sql index 35aff4d8c95b..4dfd4de9080c 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(SQLite.MS.LinqService).sql @@ -34,3 +34,60 @@ BeforeExecute SELECT last_insert_rowid() +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 23 + +SELECT + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id +LIMIT 1 + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @Gender NChar(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName NVarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName NVarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName NVarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID -- Int32 +SET @ID = 23 + +UPDATE + [Person] +SET + [Gender] = @Gender, + [FirstName] = @Name_FirstName, + [MiddleName] = @Name_MiddleName, + [LastName] = @Name_LastName +WHERE + [Person].[PersonID] = @ID + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) +DECLARE @id -- Int32 +SET @id = 23 + +SELECT + [t1].[PersonID], + [t1].[Gender], + [t1].[FirstName], + [t1].[MiddleName], + [t1].[LastName] +FROM + [Person] [t1] +WHERE + [t1].[PersonID] = @id +LIMIT 1 + diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.MS.LinqService).sql index e3f5134f856c..58a747fcb382 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.MS.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.MS SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [s].[Id], + [Value] = [s].[Value], + [ValueStr] = [s].[ValueStr] +FROM + [TableWithData] [s] +WHERE + [DestinationTable].[Id] = [s].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.MS.LinqService).sql index e3f5134f856c..a0fb7eaee80c 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateExpressionWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.MS.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.MS SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [t1].[Id], + [Value] = [t1].[Value], + [ValueStr] = [t1].[ValueStr] +FROM + [TableWithData] [t1] +WHERE + [t1].[Id] = 3 AND [DestinationTable].[Id] = [t1].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.MS.LinqService).sql index e3f5134f856c..58a747fcb382 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdate(SQLite.MS.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.MS SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [s].[Id], + [Value] = [s].[Value], + [ValueStr] = [s].[ValueStr] +FROM + [TableWithData] [s] +WHERE + [DestinationTable].[Id] = [s].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.MS.LinqService).sql index e3f5134f856c..a0fb7eaee80c 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateITableWithProjectionOutputTestAsyncWithoutOldAlternateUpdateSingleRecord(SQLite.MS.LinqService).sql @@ -1,436 +1,16 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [DestinationTable] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = 0 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = '0Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-1Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-2Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-3Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-4Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-5Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-6Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-7Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(5) -- String -SET @ValueStr = '-8Dst' - -INSERT INTO [DestinationTable] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [DestinationTable] - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.MS SQLite (asynchronously) + +UPDATE + [DestinationTable] +SET + [Id] = [t1].[Id], + [Value] = [t1].[Value], + [ValueStr] = [t1].[ValueStr] +FROM + [TableWithData] [t1] +WHERE + [t1].[Id] = 3 AND [DestinationTable].[Id] = [t1].[Id] +RETURNING + [DestinationTable].[Value] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.MS.LinqService).sql index c9720c27d3c4..8c8afc2689c7 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOld(SQLite.MS.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.MS SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.MS.LinqService).sql index c9720c27d3c4..0040dedabfc5 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateIUpdatableWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.MS.LinqService).sql @@ -1,218 +1,13 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.MS SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.MS.LinqService).sql index c9720c27d3c4..8fec9b20b371 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOld(SQLite.MS.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.MS SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] > 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.MS.LinqService).sql b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.MS.LinqService).sql index c9720c27d3c4..f51c474848d2 100644 --- a/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.MS.LinqService).sql +++ b/SQLite.MS.LinqService/Tests/xUpdate/UpdateWithOutputTests/Tests.xUpdate.UpdateWithOutputTests.UpdateSourceWithProjectionOutputTestAsyncWithoutOldSingleRecord(SQLite.MS.LinqService).sql @@ -1,218 +1,14 @@ BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] - -BeforeExecute --- SQLite.MS SQLite - -CREATE TABLE IF NOT EXISTS [TableWithData] -( - [Id] INTEGER NOT NULL, - [Value] INTEGER NOT NULL, - [ValueStr] NVarChar(50) NULL -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 1 -DECLARE @Value -- Int32 -SET @Value = -1 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str1' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 2 -DECLARE @Value -- Int32 -SET @Value = -2 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str2' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 3 -DECLARE @Value -- Int32 -SET @Value = -3 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str3' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 4 -DECLARE @Value -- Int32 -SET @Value = -4 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str4' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 5 -DECLARE @Value -- Int32 -SET @Value = -5 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str5' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 6 -DECLARE @Value -- Int32 -SET @Value = -6 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str6' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 7 -DECLARE @Value -- Int32 -SET @Value = -7 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str7' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 8 -DECLARE @Value -- Int32 -SET @Value = -8 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str8' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite -DECLARE @Id -- Int32 -SET @Id = 9 -DECLARE @Value -- Int32 -SET @Value = -9 -DECLARE @ValueStr NVarChar(4) -- String -SET @ValueStr = 'Str9' - -INSERT INTO [TableWithData] -( - [Id], - [Value], - [ValueStr] -) -VALUES -( - @Id, - @Value, - @ValueStr -) - -BeforeExecute --- SQLite.MS SQLite - -DROP TABLE IF EXISTS [TableWithData] +-- SQLite.MS SQLite (asynchronously) + +UPDATE + [TableWithData] +SET + [Id] = [TableWithData].[Id], + [Value] = [TableWithData].[Value] + 1, + [ValueStr] = [TableWithData].[ValueStr] || 'Upd' +WHERE + [TableWithData].[Id] = 3 +RETURNING + [TableWithData].[Value] diff --git a/SQLite.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.MS).sql b/SQLite.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.MS).sql new file mode 100644 index 000000000000..4d43c0828f13 --- /dev/null +++ b/SQLite.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(SQLite.MS).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.MS).sql b/SQLite.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.MS).sql new file mode 100644 index 000000000000..c4e8d753e7d9 --- /dev/null +++ b/SQLite.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(SQLite.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + diff --git a/SQLite.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.MS).sql b/SQLite.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.MS).sql new file mode 100644 index 000000000000..c4e8d753e7d9 --- /dev/null +++ b/SQLite.MS/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(SQLite.MS).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- SQLite.MS SQLite (asynchronously) + +SELECT + [t1].[ParentID], + [t1].[Value1] +FROM + [Parent] [t1] + From 93c0ca598a42bc48607cfec6c3a8c42f56c66180 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Thu, 20 Feb 2025 07:49:14 +0000 Subject: [PATCH 36/40] [Linux / DB2 LUW 11.5] baselines --- ...AllAnyTests.All4Async(DB2.LinqService).sql | 14 ++ ...onTests.GroupBy2Async(DB2.LinqService).sql | 30 +++ ...sAsyncEnumerable1Test(DB2.LinqService).sql | 9 + ...sAsyncEnumerable2Test(DB2.LinqService).sql | 11 + ...ncEnumerableCast1Test(DB2.LinqService).sql | 9 + ...ncEnumerableCast2Test(DB2.LinqService).sql | 11 + ...sts.ContainsAsyncTest(DB2.LinqService).sql | 18 ++ ...cTests.FirstAsyncTest(DB2.LinqService).sql | 15 ++ ...yncTests.TakeSkipTest(DB2.LinqService).sql | 14 ++ ...ts.TestFirstOrDefault(DB2.LinqService).sql | 20 ++ ...sts.ToLookupAsyncTest(DB2.LinqService).sql | 21 ++ ...ookupElementAsyncTest(DB2.LinqService).sql | 21 ++ ...ileTests.AnyTestAsync(DB2.LinqService).sql | 32 +++ ...leTests.AnyTestAsync2(DB2.LinqService).sql | 32 +++ ...essionMethoAsyncdTest(DB2.LinqService).sql | 16 ++ ...ts.CompiledTest3Async(DB2.LinqService).sql | 28 +++ ...sts.ContainsTestAsync(DB2.LinqService).sql | 36 +++ ...eTests.CountTestAsync(DB2.LinqService).sql | 24 ++ ...Tests.CountTestAsync2(DB2.LinqService).sql | 24 ++ ...sts.ElementTestAsync1(DB2.LinqService).sql | 28 +++ ...sts.ElementTestAsync2(DB2.LinqService).sql | 28 +++ ...ileTests.MaxTestAsync(DB2.LinqService).sql | 24 ++ ...leTests.MaxTestAsync2(DB2.LinqService).sql | 24 ++ ...ync.AnyPredicateAsync(DB2.LinqService).sql | 183 ++------------- ...c.CountPredicateAsync(DB2.LinqService).sql | 179 +-------------- ...DefaultPredicateAsync(DB2.LinqService).sql | 181 +-------------- ...c.FirstPredicateAsync(DB2.LinqService).sql | 181 +-------------- ...ngCountPredicateAsync(DB2.LinqService).sql | 179 +-------------- ...sync.MaxSelectorAsync(DB2.LinqService).sql | 179 +-------------- ...sync.MinSelectorAsync(DB2.LinqService).sql | 179 +-------------- ...DefaultPredicateAsync(DB2.LinqService).sql | 181 +-------------- ....SinglePredicateAsync(DB2.LinqService).sql | 181 +-------------- ...ionTests.Concat1Async(DB2.LinqService).sql | 19 ++ ...estAutoIncrementAsync(DB2.LinqService).sql | 97 ++++++++ ...sts.TestFilteredAsync(DB2.LinqService).sql | 80 +++++++ ...ountTests.Count1Async(DB2.LinqService).sql | 8 + ...ountTests.Count2Async(DB2.LinqService).sql | 10 + ...sts.SubQueryMax1Async(DB2.LinqService).sql | 16 ++ ...olumnsTests.Issue4602(DB2.LinqService).sql | 70 +----- ...Tests.Issue4057_Async(DB2.LinqService).sql | 31 +++ ...c_ExplicitTransaction(DB2.LinqService).sql | 31 +++ ...MethodExpressionAsync(DB2.LinqService).sql | 25 ++ ...tanceTests.Cast1Async(DB2.LinqService).sql | 11 + ...anceTests.Test18Async(DB2.LinqService).sql | 14 ++ ...Tests.Parameter1Async(DB2.LinqService).sql | 7 + ...orTests.Issue3132Test(DB2.LinqService).sql | 213 ++++++++++++++++++ ...ElementAt2Async(DB2.LinqService,False).sql | 14 ++ ....ElementAt2Async(DB2.LinqService,True).sql | 14 ++ ...AtDefault3Async(DB2.LinqService,False).sql | 14 ++ ...tAtDefault3Async(DB2.LinqService,True).sql | 14 ++ ...ts.MultipleSkip1Async(DB2.LinqService).sql | 92 +------- ...ests.Take1Async(DB2.LinqService,False).sql | 20 ++ ...Tests.Take1Async(DB2.LinqService,True).sql | 20 ++ ...ests.Take2Async(DB2.LinqService,False).sql | 10 + ...Tests.Take2Async(DB2.LinqService,True).sql | 10 + ...ests.Take3Async(DB2.LinqService,False).sql | 12 + ...Tests.Take3Async(DB2.LinqService,True).sql | 12 + ...ests.Take4Async(DB2.LinqService,False).sql | 12 + ...Tests.Take4Async(DB2.LinqService,True).sql | 12 + ...ests.Take5Async(DB2.LinqService,False).sql | 10 + ...Tests.Take5Async(DB2.LinqService,True).sql | 10 + ...ync(DB2.LinqService,False,False,False).sql | 19 ++ ...sync(DB2.LinqService,False,False,True).sql | 19 ++ ...sync(DB2.LinqService,False,True,False).sql | 8 + ...Async(DB2.LinqService,False,True,True).sql | 19 ++ ...sync(DB2.LinqService,True,False,False).sql | 19 ++ ...Async(DB2.LinqService,True,False,True).sql | 19 ++ ...Async(DB2.LinqService,True,True,False).sql | 8 + ...eAsync(DB2.LinqService,True,True,True).sql | 19 ++ ...sts.CreateTable1Async(DB2.LinqService).sql | 37 +++ ...ests.CreateTableAsync(DB2.LinqService).sql | 41 ++++ ...eleteByTableNameAsync(DB2.LinqService).sql | 92 ++++++++ ...ertTests.Insert2Async(DB2.LinqService).sql | 44 ++++ ...ertTests.Insert3Async(DB2.LinqService).sql | 46 ++++ ...ertTests.Insert4Async(DB2.LinqService).sql | 46 ++++ ...nsertByTableNameAsync(DB2.LinqService).sql | 72 ++++++ ...InsertOrReplace1Async(DB2.LinqService).sql | 98 ++++++++ ...placeByTableNameAsync(DB2.LinqService).sql | 155 +++++++++++++ ....InsertOrUpdate3Async(DB2.LinqService).sql | 98 ++++++++ ...InsertOrUpdate3xAsync(DB2.LinqService).sql | 104 +++++++++ ...ertWithIdentity1Async(DB2.LinqService).sql | 15 ++ ...ertWithIdentity2Async(DB2.LinqService).sql | 15 ++ ...ertWithIdentity4Async(DB2.LinqService).sql | 34 +++ ...ceInsertFromQueryAsyn(DB2.LinqService).sql | 39 ++++ ...ceInsertFromTableAsyn(DB2.LinqService).sql | 37 +++ ...ateTests.Update1Async(DB2.LinqService).sql | 54 +++++ ...ateTests.Update2Async(DB2.LinqService).sql | 54 +++++ ...ateTests.Update4Async(DB2.LinqService).sql | 63 ++++++ ...dateAssociation1Async(DB2.LinqService).sql | 47 ++++ ...eAssociation1AsyncOld(DB2.LinqService).sql | 47 ++++ ...pdateByTableNameAsync(DB2.LinqService).sql | 110 +++++++++ ...s.UpdateComplex1Async(DB2.LinqService).sql | 57 +++++ .../Tests.Linq.AsyncTests.Test(DB2).sql | 18 ++ .../Tests.Linq.AsyncTests.Test1(DB2).sql | 9 + ...Tests.Linq.AsyncTests.TestForEach(DB2).sql | 9 + 95 files changed, 2926 insertions(+), 1665 deletions(-) create mode 100644 DB2.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(DB2.LinqService,False).sql create mode 100644 DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(DB2.LinqService,True).sql create mode 100644 DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(DB2.LinqService,False).sql create mode 100644 DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(DB2.LinqService,True).sql create mode 100644 DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(DB2.LinqService,False).sql create mode 100644 DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(DB2.LinqService,True).sql create mode 100644 DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(DB2.LinqService,False).sql create mode 100644 DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(DB2.LinqService,True).sql create mode 100644 DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(DB2.LinqService,False).sql create mode 100644 DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(DB2.LinqService,True).sql create mode 100644 DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(DB2.LinqService,False).sql create mode 100644 DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(DB2.LinqService,True).sql create mode 100644 DB2.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(DB2.LinqService).sql create mode 100644 DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(DB2.LinqService).sql create mode 100644 DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(DB2).sql create mode 100644 DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(DB2).sql create mode 100644 DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(DB2).sql diff --git a/DB2.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(DB2.LinqService).sql new file mode 100644 index 000000000000..cc99eadadc28 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(DB2.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + CAST(NOT EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" <= 3 + ) AS smallint) +FROM SYSIBM.SYSDUMMY1 + diff --git a/DB2.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(DB2.LinqService).sql new file mode 100644 index 000000000000..7be7144dc520 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(DB2.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT DISTINCT + "a_Parent1"."ParentID" + FROM + "Child" "t1" + INNER JOIN "Parent" "a_Parent1" ON "t1"."ParentID" = "a_Parent1"."ParentID" + ) "m_1" + INNER JOIN "Child" "d" + INNER JOIN "Parent" "a_Parent1_1" ON "d"."ParentID" = "a_Parent1_1"."ParentID" + ON "m_1"."ParentID" = "a_Parent1_1"."ParentID" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "a_Parent1"."ParentID" +FROM + "Child" "t1" + INNER JOIN "Parent" "a_Parent1" ON "t1"."ParentID" = "a_Parent1"."ParentID" +GROUP BY + "a_Parent1"."ParentID" + diff --git a/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(DB2.LinqService).sql new file mode 100644 index 000000000000..f1a7ec48bc58 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(DB2.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(DB2.LinqService).sql new file mode 100644 index 000000000000..35631c583fbd --- /dev/null +++ b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(DB2.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" > 1 + diff --git a/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(DB2.LinqService).sql new file mode 100644 index 000000000000..f1a7ec48bc58 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(DB2.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(DB2.LinqService).sql new file mode 100644 index 000000000000..35631c583fbd --- /dev/null +++ b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(DB2.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" > 1 + diff --git a/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(DB2.LinqService).sql new file mode 100644 index 000000000000..005ed9498da4 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(DB2.LinqService).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @ID Integer(4) -- Int32 +SET @ID = 1 + +SELECT + CASE + WHEN CAST(@ID AS Int) IN ( + SELECT + "t1"."PersonID" + FROM + "Person" "t1" + ) + THEN 1 + ELSE 0 + END +FROM SYSIBM.SYSDUMMY1 + diff --git a/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(DB2.LinqService).sql new file mode 100644 index 000000000000..11a87e3075af --- /dev/null +++ b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(DB2.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."PersonID" = 1 +FETCH NEXT 1 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(DB2.LinqService).sql index 1d062bf3fa18..7501905d0edf 100644 --- a/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(DB2.LinqService).sql @@ -12,3 +12,17 @@ ORDER BY "t1"."ParentID" OFFSET 1 ROWS FETCH NEXT @take ROWS ONLY +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @take Integer(4) -- Int32 +SET @take = 2 + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" +ORDER BY + "t1"."ParentID" +OFFSET 1 ROWS FETCH NEXT @take ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(DB2.LinqService).sql new file mode 100644 index 000000000000..7b29fbe6854d --- /dev/null +++ b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(DB2.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 +DECLARE @p_1 Integer(4) -- Int32 +SET @p_1 = 2 +DECLARE @p_2 Integer(4) -- Int32 +SET @p_2 = 3 +DECLARE @param Integer(4) -- Int32 +SET @param = 4 + +SELECT + "o"."ParentID", + "o"."Value1" +FROM + "Parent" "o" +WHERE + "o"."ParentID" IN (@p, @p_1, @p_2) OR "o"."ParentID" = @param +FETCH NEXT 1 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(DB2.LinqService).sql new file mode 100644 index 000000000000..4533f055b2b9 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(DB2.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +ORDER BY + "t1"."ParentID", + "t1"."ChildID" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(DB2.LinqService).sql new file mode 100644 index 000000000000..4533f055b2b9 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(DB2.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +ORDER BY + "t1"."ParentID", + "t1"."ChildID" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" + diff --git a/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(DB2.LinqService).sql new file mode 100644 index 000000000000..c495d52a883b --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(DB2.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + CAST(EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) AS smallint) +FROM SYSIBM.SYSDUMMY1 + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = -1 + +SELECT + CAST(EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) AS smallint) +FROM SYSIBM.SYSDUMMY1 + diff --git a/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(DB2.LinqService).sql new file mode 100644 index 000000000000..c495d52a883b --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(DB2.LinqService).sql @@ -0,0 +1,32 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + CAST(EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) AS smallint) +FROM SYSIBM.SYSDUMMY1 + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = -1 + +SELECT + CAST(EXISTS( + SELECT + * + FROM + "Child" "c_1" + WHERE + "c_1"."ParentID" = @p + ) AS smallint) +FROM SYSIBM.SYSDUMMY1 + diff --git a/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(DB2.LinqService).sql new file mode 100644 index 000000000000..eafa2afc72de --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(DB2.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = @p +ORDER BY + "x"."ParentID" DESC +FETCH NEXT 1 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(DB2.LinqService).sql new file mode 100644 index 000000000000..0228460733ce --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(DB2.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 2 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(DB2.LinqService).sql new file mode 100644 index 000000000000..093e421e5f04 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(DB2.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + CASE + WHEN CAST(@p AS Int) IN ( + SELECT + "c_1"."ParentID" + FROM + "Child" "c_1" + ) + THEN 1 + ELSE 0 + END +FROM SYSIBM.SYSDUMMY1 + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = -1 + +SELECT + CASE + WHEN CAST(@p AS Int) IN ( + SELECT + "c_1"."ParentID" + FROM + "Child" "c_1" + ) + THEN 1 + ELSE 0 + END +FROM SYSIBM.SYSDUMMY1 + diff --git a/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(DB2.LinqService).sql new file mode 100644 index 000000000000..2806c80278ff --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(DB2.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(DB2.LinqService).sql new file mode 100644 index 000000000000..2806c80278ff --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(DB2.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = -1 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(DB2.LinqService).sql new file mode 100644 index 000000000000..a59f795f8396 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(DB2.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(DB2.LinqService).sql new file mode 100644 index 000000000000..a59f795f8396 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(DB2.LinqService).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + "c_1"."ParentID", + "c_1"."ChildID" +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p +FETCH NEXT 1 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(DB2.LinqService).sql new file mode 100644 index 000000000000..226be663c459 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(DB2.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = -1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(DB2.LinqService).sql new file mode 100644 index 000000000000..226be663c459 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(DB2.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = -1 + +SELECT + MAX("c_1"."ParentID") +FROM + "Child" "c_1" +WHERE + "c_1"."ParentID" = @p + diff --git a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(DB2.LinqService).sql index bd33119ccd4e..4736d08bbcff 100644 --- a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(DB2.LinqService).sql @@ -1,171 +1,16 @@ BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42710' BEGIN END; - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + CAST(EXISTS( + SELECT + * + FROM + "AsyncDataTable" "c_1" + WHERE + "c_1"."Id" = @p + ) AS smallint) +FROM SYSIBM.SYSDUMMY1 diff --git a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(DB2.LinqService).sql index bd33119ccd4e..f1fc08ff8206 100644 --- a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(DB2.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42710' BEGIN END; - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = @p diff --git a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(DB2.LinqService).sql index bd33119ccd4e..7abe7f38583b 100644 --- a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(DB2.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42710' BEGIN END; - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 1 ROWS ONLY diff --git a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(DB2.LinqService).sql index bd33119ccd4e..7abe7f38583b 100644 --- a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(DB2.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42710' BEGIN END; - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 1 ROWS ONLY diff --git a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(DB2.LinqService).sql index bd33119ccd4e..f1fc08ff8206 100644 --- a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(DB2.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42710' BEGIN END; - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + COUNT(*) +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = @p diff --git a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(DB2.LinqService).sql index bd33119ccd4e..a502ebef9263 100644 --- a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(DB2.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42710' BEGIN END; - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + MAX("c_1"."Id") +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" > @p diff --git a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(DB2.LinqService).sql index bd33119ccd4e..7ee4d7d7fa1c 100644 --- a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(DB2.LinqService).sql @@ -1,171 +1,12 @@ BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42710' BEGIN END; - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + MIN("c_1"."Id") +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" > @p diff --git a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(DB2.LinqService).sql index bd33119ccd4e..960fc7bb8a57 100644 --- a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(DB2.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42710' BEGIN END; - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 2 ROWS ONLY diff --git a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(DB2.LinqService).sql index bd33119ccd4e..960fc7bb8a57 100644 --- a/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(DB2.LinqService).sql @@ -1,171 +1,14 @@ BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42710' BEGIN END; - EXECUTE IMMEDIATE ' - CREATE TABLE "AsyncDataTable" - ( - "Id" Int NOT NULL, - - CONSTRAINT "PK_AsyncDataTable" PRIMARY KEY ("Id") - ) - '; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 1 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 2 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 3 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 4 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 5 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 6 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 7 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 8 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 9 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Id Integer(4) -- Int32 -SET @Id = 10 - -INSERT INTO "AsyncDataTable" -( - "Id" -) -VALUES -( - @Id -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "AsyncDataTable"'; -END +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 2 + +SELECT + CAST(@p AS Int), + "c_1"."Id" +FROM + "AsyncDataTable" "c_1" +WHERE + "c_1"."Id" = CAST(@p AS Int) +FETCH NEXT 2 ROWS ONLY diff --git a/DB2.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(DB2.LinqService).sql new file mode 100644 index 000000000000..059ed03ad924 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(DB2.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" = 1 +UNION ALL +SELECT + "p_1"."ParentID", + "p_1"."Value1" +FROM + "Parent" "p_1" +WHERE + "p_1"."ParentID" = 2 + diff --git a/DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(DB2.LinqService).sql index 01096b89aab0..e225f879936d 100644 --- a/DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(DB2.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyAutoIncrement" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- DB2 DB2.LUW DB2LUW SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = @Value +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- DB2 DB2.LUW DB2LUW @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = @Value +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- DB2 DB2.LUW DB2LUW @@ -28,6 +84,23 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 3' +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -9 + +UPDATE + "ConcurrencyAutoIncrement" "obj" +SET + "Stamp" = "obj"."Stamp" + 1, + "Value" = @Value +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- DB2 DB2.LUW DB2LUW @@ -38,6 +111,18 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyAutoIncrement" "obj" +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- DB2 DB2.LUW DB2LUW @@ -48,6 +133,18 @@ SELECT FROM "ConcurrencyAutoIncrement" "t1" +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -8 + +DELETE FROM + "ConcurrencyAutoIncrement" "obj" +WHERE + "obj"."Id" = @Id AND "obj"."Stamp" = @Stamp + BeforeExecute -- DB2 DB2.LUW DB2LUW diff --git a/DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(DB2.LinqService).sql index 90b9ca1f7745..fc92992946f2 100644 --- a/DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(DB2.LinqService).sql @@ -1,4 +1,26 @@ BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -10 +DECLARE @Value VarChar(7) -- String +SET @Value = 'initial' + +INSERT INTO "ConcurrencyFiltered" +( + "Id", + "Stamp", + "Value" +) +VALUES +( + @Id, + @Stamp, + @Value +) + +BeforeExecute -- DB2 DB2.LUW DB2LUW SELECT @@ -8,6 +30,23 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 1' +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" "r" +SET + "Stamp" = "r"."Stamp" + 1, + "Value" = @Value +WHERE + "r"."Id" = 2 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- DB2 DB2.LUW DB2LUW @@ -18,6 +57,23 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @Value VarChar(7) -- String +SET @Value = 'value 2' +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -10 + +UPDATE + "ConcurrencyFiltered" "r" +SET + "Stamp" = "r"."Stamp" + 1, + "Value" = @Value +WHERE + "r"."Id" = 1 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- DB2 DB2.LUW DB2LUW @@ -28,6 +84,18 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" "r" +WHERE + "r"."Id" = 2 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- DB2 DB2.LUW DB2LUW @@ -38,6 +106,18 @@ SELECT FROM "ConcurrencyFiltered" "t1" +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Stamp Integer(4) -- Int32 +SET @Stamp = -9 + +DELETE FROM + "ConcurrencyFiltered" "r" +WHERE + "r"."Id" = 1 AND "r"."Id" = @Id AND "r"."Stamp" = @Stamp + BeforeExecute -- DB2 DB2.LUW DB2LUW diff --git a/DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(DB2.LinqService).sql new file mode 100644 index 000000000000..a2d9decd6271 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(DB2.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" "t1" + diff --git a/DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(DB2.LinqService).sql new file mode 100644 index 000000000000..fc90449430a5 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(DB2.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 2 + diff --git a/DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(DB2.LinqService).sql new file mode 100644 index 000000000000..78db546d135d --- /dev/null +++ b/DB2.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.SubQueryMax1Async(DB2.LinqService).sql @@ -0,0 +1,16 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + MAX(( + SELECT + COUNT(*) + FROM + "Child" "c_1" + LEFT JOIN "Parent" "a_Parent" ON "c_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "a_Parent"."ParentID" = "t1"."ParentID" + )) +FROM + "Parent" "t1" + diff --git a/DB2.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(DB2.LinqService).sql index 5fb28a05f861..d6d5b700b5b3 100644 --- a/DB2.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(DB2.LinqService).sql @@ -1,63 +1,11 @@ BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42710' BEGIN END; - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicParent" - ( - ID Int GENERATED ALWAYS AS IDENTITY NOT NULL, - - CONSTRAINT "PK_DynamicParent" PRIMARY KEY (ID) - ) - '; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42710' BEGIN END; - EXECUTE IMMEDIATE ' - CREATE TABLE "DynamicChild" - ( - ID Int GENERATED ALWAYS AS IDENTITY NOT NULL, - "ParentID" Int NOT NULL, - - CONSTRAINT "PK_DynamicChild" PRIMARY KEY (ID) - ) - '; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "DynamicChild"'; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "DynamicParent"'; -END +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "it".ID +FROM + "DynamicParent" "it" + LEFT JOIN "DynamicChild" "a_Child" ON "it".ID = "a_Child"."ParentID" +WHERE + "a_Child".ID = 123 diff --git a/DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(DB2.LinqService).sql index 3b8d554089e9..85bfdc02191e 100644 --- a/DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(DB2.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT + "x"."ParentID" + FROM + "Parent" "x" + WHERE + "x"."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) "m_1" + INNER JOIN "Child" "d" ON "m_1"."ParentID" = "d"."ParentID" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransactionAsync(RepeatableRead) BeforeExecute -- DB2 DB2.LUW DB2LUW (asynchronously) diff --git a/DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(DB2.LinqService).sql index 10d6b2ff190b..763e9ccc2ba8 100644 --- a/DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(DB2.LinqService).sql @@ -1,4 +1,35 @@ BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "m_1"."ParentID", + "d"."ParentID", + "d"."ChildID" +FROM + ( + SELECT + "x"."ParentID" + FROM + "Parent" "x" + WHERE + "x"."ParentID" = 3 + FETCH NEXT 1 ROWS ONLY + ) "m_1" + INNER JOIN "Child" "d" ON "m_1"."ParentID" = "d"."ParentID" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "x"."ParentID", + "x"."Value1" +FROM + "Parent" "x" +WHERE + "x"."ParentID" = 3 +FETCH NEXT 1 ROWS ONLY + +BeforeExecute BeginTransaction BeforeExecute -- DB2 DB2.LUW DB2LUW (asynchronously) diff --git a/DB2.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(DB2.LinqService).sql new file mode 100644 index 000000000000..2215e1084307 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/ExpressionsTests/Tests.Linq.ExpressionsTests.AssociationMethodExpressionAsync(DB2.LinqService).sql @@ -0,0 +1,25 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + ( + SELECT + COUNT(*) + FROM + "Child" "a_Children" + INNER JOIN "GrandChild" "a_GrandChildren" ON "a_Children"."ParentID" = "a_GrandChildren"."ParentID" AND "a_Children"."ChildID" = "a_GrandChildren"."ChildID" + WHERE + "p"."ParentID" = "a_Children"."ParentID" + ) +FROM + "Parent" "p" + diff --git a/DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(DB2.LinqService).sql new file mode 100644 index 000000000000..2c7483e17178 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(DB2.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" +WHERE + "t1"."Value1" = 1 + diff --git a/DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(DB2.LinqService).sql new file mode 100644 index 000000000000..48cb7f8afb4e --- /dev/null +++ b/DB2.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(DB2.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT DISTINCT + "p1"."PersonID", + "p1"."Gender", + "p1"."FirstName", + "p1"."LastName" +FROM + "Person" "p1" +WHERE + "p1"."PersonID" IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND + "p1"."Gender" = 'F' + diff --git a/DB2.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(DB2.LinqService).sql new file mode 100644 index 000000000000..01b0c3cdc159 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(DB2.LinqService).sql @@ -0,0 +1,7 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + 1 +FROM SYSIBM.SYSDUMMY1 + diff --git a/DB2.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(DB2.LinqService).sql new file mode 100644 index 000000000000..c36630a3142b --- /dev/null +++ b/DB2.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(DB2.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "x"."MiddleName", + COUNT(*) +FROM + "Person" "x" +WHERE + "x"."MiddleName" IS NOT NULL +GROUP BY + "x"."MiddleName" +UNION ALL +SELECT + "x_1"."MiddleName", + COUNT(*) +FROM + "Person" "x_1" +WHERE + "x_1"."MiddleName" IS NOT NULL +GROUP BY + "x_1"."MiddleName" +UNION ALL +SELECT + "x_2"."MiddleName", + COUNT(*) +FROM + "Person" "x_2" +WHERE + "x_2"."MiddleName" IS NOT NULL +GROUP BY + "x_2"."MiddleName" +UNION ALL +SELECT + "x_3"."MiddleName", + COUNT(*) +FROM + "Person" "x_3" +WHERE + "x_3"."MiddleName" IS NOT NULL +GROUP BY + "x_3"."MiddleName" +UNION ALL +SELECT + "x_4"."MiddleName", + COUNT(*) +FROM + "Person" "x_4" +WHERE + "x_4"."MiddleName" IS NOT NULL +GROUP BY + "x_4"."MiddleName" +UNION ALL +SELECT + "x_5"."MiddleName", + COUNT(*) +FROM + "Person" "x_5" +WHERE + "x_5"."MiddleName" IS NOT NULL +GROUP BY + "x_5"."MiddleName" +UNION ALL +SELECT + "x_6"."MiddleName", + COUNT(*) +FROM + "Person" "x_6" +WHERE + "x_6"."MiddleName" IS NOT NULL +GROUP BY + "x_6"."MiddleName" +UNION ALL +SELECT + "x_7"."MiddleName", + COUNT(*) +FROM + "Person" "x_7" +WHERE + "x_7"."MiddleName" IS NOT NULL +GROUP BY + "x_7"."MiddleName" +UNION ALL +SELECT + "x_8"."MiddleName", + COUNT(*) +FROM + "Person" "x_8" +WHERE + "x_8"."MiddleName" IS NOT NULL +GROUP BY + "x_8"."MiddleName" +UNION ALL +SELECT + "x_9"."MiddleName", + COUNT(*) +FROM + "Person" "x_9" +WHERE + "x_9"."MiddleName" IS NOT NULL +GROUP BY + "x_9"."MiddleName" +UNION ALL +SELECT + "x_10"."MiddleName", + COUNT(*) +FROM + "Person" "x_10" +WHERE + "x_10"."MiddleName" IS NOT NULL +GROUP BY + "x_10"."MiddleName" +UNION ALL +SELECT + "x_11"."MiddleName", + COUNT(*) +FROM + "Person" "x_11" +WHERE + "x_11"."MiddleName" IS NOT NULL +GROUP BY + "x_11"."MiddleName" +UNION ALL +SELECT + "x_12"."MiddleName", + COUNT(*) +FROM + "Person" "x_12" +WHERE + "x_12"."MiddleName" IS NOT NULL +GROUP BY + "x_12"."MiddleName" +UNION ALL +SELECT + "x_13"."MiddleName", + COUNT(*) +FROM + "Person" "x_13" +WHERE + "x_13"."MiddleName" IS NOT NULL +GROUP BY + "x_13"."MiddleName" +UNION ALL +SELECT + "x_14"."MiddleName", + COUNT(*) +FROM + "Person" "x_14" +WHERE + "x_14"."MiddleName" IS NOT NULL +GROUP BY + "x_14"."MiddleName" +UNION ALL +SELECT + "x_15"."MiddleName", + COUNT(*) +FROM + "Person" "x_15" +WHERE + "x_15"."MiddleName" IS NOT NULL +GROUP BY + "x_15"."MiddleName" +UNION ALL +SELECT + "x_16"."MiddleName", + COUNT(*) +FROM + "Person" "x_16" +WHERE + "x_16"."MiddleName" IS NOT NULL +GROUP BY + "x_16"."MiddleName" +UNION ALL +SELECT + "x_17"."MiddleName", + COUNT(*) +FROM + "Person" "x_17" +WHERE + "x_17"."MiddleName" IS NOT NULL +GROUP BY + "x_17"."MiddleName" +UNION ALL +SELECT + "x_18"."MiddleName", + COUNT(*) +FROM + "Person" "x_18" +WHERE + "x_18"."MiddleName" IS NOT NULL +GROUP BY + "x_18"."MiddleName" +UNION ALL +SELECT + "x_19"."MiddleName", + COUNT(*) +FROM + "Person" "x_19" +WHERE + "x_19"."MiddleName" IS NOT NULL +GROUP BY + "x_19"."MiddleName" +UNION ALL +SELECT + "x_20"."MiddleName", + COUNT(*) +FROM + "Person" "x_20" +WHERE + "x_20"."MiddleName" IS NOT NULL +GROUP BY + "x_20"."MiddleName" + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(DB2.LinqService,False).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(DB2.LinqService,False).sql new file mode 100644 index 000000000000..17b39d608b15 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(DB2.LinqService,False).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET 3 ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(DB2.LinqService,True).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(DB2.LinqService,True).sql new file mode 100644 index 000000000000..17b39d608b15 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(DB2.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET 3 ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(DB2.LinqService,False).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(DB2.LinqService,False).sql new file mode 100644 index 000000000000..17b39d608b15 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(DB2.LinqService,False).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET 3 ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(DB2.LinqService,True).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(DB2.LinqService,True).sql new file mode 100644 index 000000000000..17b39d608b15 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(DB2.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "p"."ParentID", + "p"."Value1" +FROM + "Parent" "p" +WHERE + "p"."ParentID" > 1 +ORDER BY + "p"."ParentID" +OFFSET 3 ROWS FETCH NEXT 1 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(DB2.LinqService).sql index b61b99e820ba..c2ed549d4d3c 100644 --- a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(DB2.LinqService).sql @@ -1,85 +1,11 @@ BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42710' BEGIN END; - EXECUTE IMMEDIATE ' - CREATE TABLE "TakeSkipClass" - ( - "Value" VarChar(10) NULL - ) - '; -END - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Value VarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Value VarChar(5) -- String -SET @Value = 'PIPPO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Value VarChar(5) -- String -SET @Value = 'PLUTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW -DECLARE @Value VarChar(5) -- String -SET @Value = 'BOLTO' - -INSERT INTO "TakeSkipClass" -( - "Value" -) -VALUES -( - @Value -) - -BeforeExecute --- DB2 DB2.LUW DB2LUW - -BEGIN - DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; - EXECUTE IMMEDIATE 'DROP TABLE "TakeSkipClass"'; -END +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."Value" +FROM + "TakeSkipClass" "t1" +ORDER BY + "t1"."Value" +OFFSET 3 ROWS diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(DB2.LinqService,False).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(DB2.LinqService,False).sql index ae5952db4c3c..423f006aa1d6 100644 --- a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(DB2.LinqService,False).sql +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(DB2.LinqService,False).sql @@ -18,3 +18,23 @@ FROM "Child" "ch" FETCH NEXT 3 ROWS ONLY +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT 3 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(DB2.LinqService,True).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(DB2.LinqService,True).sql index ae5952db4c3c..423f006aa1d6 100644 --- a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(DB2.LinqService,True).sql +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(DB2.LinqService,True).sql @@ -18,3 +18,23 @@ FROM "Child" "ch" FETCH NEXT 3 ROWS ONLY +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +FETCH NEXT 3 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(DB2.LinqService,False).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(DB2.LinqService,False).sql new file mode 100644 index 000000000000..1c191c4e1575 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(DB2.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT 1 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(DB2.LinqService,True).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(DB2.LinqService,True).sql new file mode 100644 index 000000000000..1c191c4e1575 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(DB2.LinqService,True).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT 1 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(DB2.LinqService,False).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(DB2.LinqService,False).sql new file mode 100644 index 000000000000..544b24112a81 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(DB2.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" > 3 OR "ch"."ChildID" < 4 +FETCH NEXT 3 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(DB2.LinqService,True).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(DB2.LinqService,True).sql new file mode 100644 index 000000000000..544b24112a81 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(DB2.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" > 3 OR "ch"."ChildID" < 4 +FETCH NEXT 3 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(DB2.LinqService,False).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(DB2.LinqService,False).sql new file mode 100644 index 000000000000..fcc83f2ac6e3 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(DB2.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" >= 0 AND "ch"."ChildID" <= 100 +FETCH NEXT 3 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(DB2.LinqService,True).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(DB2.LinqService,True).sql new file mode 100644 index 000000000000..fcc83f2ac6e3 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(DB2.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "ch"."ParentID", + "ch"."ChildID" +FROM + "Child" "ch" +WHERE + "ch"."ChildID" >= 0 AND "ch"."ChildID" <= 100 +FETCH NEXT 3 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(DB2.LinqService,False).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(DB2.LinqService,False).sql new file mode 100644 index 000000000000..21f0f1602246 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(DB2.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT 3 ROWS ONLY + diff --git a/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(DB2.LinqService,True).sql b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(DB2.LinqService,True).sql new file mode 100644 index 000000000000..21f0f1602246 --- /dev/null +++ b/DB2.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(DB2.LinqService,True).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."ChildID" +FROM + "Child" "t1" +FETCH NEXT 3 ROWS ONLY + diff --git a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,False,False).sql b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,False,False).sql index c01427eaa168..c780491fd9b9 100644 --- a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,False,False).sql +++ b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,False,False).sql @@ -6,3 +6,22 @@ BEGIN EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +END + diff --git a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,False,True).sql b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,False,True).sql index dcf60b151754..1a9a1ea1ef74 100644 --- a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,False,True).sql +++ b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,False,True).sql @@ -15,3 +15,22 @@ BEGIN EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +CREATE TABLE DB2INST1."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +END + diff --git a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,True,False).sql b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,True,False).sql index 0bc25a8c9c58..6b81f95c0176 100644 --- a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,True,False).sql +++ b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,True,False).sql @@ -15,3 +15,11 @@ BEGIN EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +END + diff --git a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,True,True).sql b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,True,True).sql index b3cc681e0b7f..5b505cee334d 100644 --- a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,True,True).sql +++ b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,False,True,True).sql @@ -24,3 +24,22 @@ BEGIN EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +CREATE TABLE TESTDB.DB2INST1."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +END + diff --git a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,False,False).sql b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,False,False).sql index c01427eaa168..c780491fd9b9 100644 --- a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,False,False).sql +++ b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,False,False).sql @@ -6,3 +6,22 @@ BEGIN EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +CREATE TABLE "Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +END + diff --git a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,False,True).sql b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,False,True).sql index dcf60b151754..1a9a1ea1ef74 100644 --- a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,False,True).sql +++ b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,False,True).sql @@ -15,3 +15,22 @@ BEGIN EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +CREATE TABLE DB2INST1."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +END + diff --git a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,True,False).sql b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,True,False).sql index 0bc25a8c9c58..6b81f95c0176 100644 --- a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,True,False).sql +++ b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,True,False).sql @@ -15,3 +15,11 @@ BEGIN EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +END + diff --git a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,True,True).sql b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,True,True).sql index b3cc681e0b7f..5b505cee334d 100644 --- a/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,True,True).sql +++ b/DB2.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(DB2.LinqService,True,True,True).sql @@ -24,3 +24,22 @@ BEGIN EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; END +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +CREATE TABLE TESTDB.DB2INST1."Issue681Table2" +( + ID Int NOT NULL, + "Value" Int NOT NULL, + + CONSTRAINT "PK_Issue681Table2" PRIMARY KEY (ID) +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "Issue681Table2"'; +END + diff --git a/DB2.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(DB2.LinqService).sql new file mode 100644 index 000000000000..7964dc5ad79e --- /dev/null +++ b/DB2.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(DB2.LinqService).sql @@ -0,0 +1,37 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "TestTable"'; +END + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +CREATE TABLE "TestTable" +( + ID Int GENERATED ALWAYS AS IDENTITY NOT NULL, + "Field1" NVarChar(50) NULL, + "Field2" NVarChar(255) NULL, + "CreatedOn" timestamp NULL, + + CONSTRAINT "PK_TestTable" PRIMARY KEY (ID) +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1".ID, + "t1"."Field1", + "t1"."Field2", + "t1"."CreatedOn" +FROM + "TestTable" "t1" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +DROP TABLE "TestTable" + diff --git a/DB2.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(DB2.LinqService).sql index 23f115b82b65..9a96666e47ab 100644 --- a/DB2.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(DB2.LinqService).sql @@ -1,4 +1,37 @@ BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +END + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42710' BEGIN END; + EXECUTE IMMEDIATE ' + CREATE TABLE "TempTable" + ( + ID Int NOT NULL + ) + '; +END + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +INSERT INTO "TempTable" +( + ID +) +SELECT + "p"."ParentID" +FROM + "Parent" "p" + +BeforeExecute -- DB2 DB2.LUW DB2LUW SELECT @@ -7,3 +40,11 @@ FROM "Parent" "p" INNER JOIN "TempTable" "t" ON "p"."ParentID" = "t".ID +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "TempTable"'; +END + diff --git a/DB2.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(DB2.LinqService).sql new file mode 100644 index 000000000000..af46ee80cb49 --- /dev/null +++ b/DB2.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(DB2.LinqService).sql @@ -0,0 +1,92 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson"'; +END + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" NVarChar(255) NOT NULL, + "PersonID" Int GENERATED ALWAYS AS IDENTITY NOT NULL, + "LastName" NVarChar(255) NOT NULL, + "MiddleName" NVarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- StringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" "t1" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson" "t1" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @ID Integer(4) -- Int32 +SET @ID = 1 + +DELETE FROM + "xxPerson" "t1" +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" "t1" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(DB2.LinqService).sql new file mode 100644 index 000000000000..9ede6c11f4f9 --- /dev/null +++ b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(DB2.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(DB2.LinqService).sql new file mode 100644 index 000000000000..f04b1562fa12 --- /dev/null +++ b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(DB2.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + "c_1"."ParentID", + CAST(@id AS Int) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = 11 + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(DB2.LinqService).sql new file mode 100644 index 000000000000..f04b1562fa12 --- /dev/null +++ b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(DB2.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +SELECT + "c_1"."ParentID", + CAST(@id AS Int) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = 11 + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +DELETE FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" > 1000 + diff --git a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(DB2.LinqService).sql index a0afda1e3b6b..8b86c53e6012 100644 --- a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(DB2.LinqService).sql @@ -1,5 +1,45 @@ BeforeExecute -- DB2 DB2.LUW DB2LUW (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" NVarChar(255) NOT NULL, + "PersonID" Int GENERATED ALWAYS AS IDENTITY NOT NULL, + "LastName" NVarChar(255) NOT NULL, + "MiddleName" NVarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- StringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) DECLARE @FirstName VarChar(6) -- String SET @FirstName = 'Steven' DECLARE @LastName VarChar(4) -- String @@ -62,3 +102,35 @@ FROM ) ) +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" "t1" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" "p" +WHERE + "p"."FirstName" = 'Steven' AND "p"."LastName" = 'King' AND + "p"."Gender" = 'M' + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +DROP TABLE "xxPerson" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson"'; +END + diff --git a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(DB2.LinqService).sql index 23d53e07404a..f6082c345c38 100644 --- a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplace1Async(DB2.LinqService).sql @@ -35,3 +35,101 @@ FROM ) ) +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc0' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS NVarChar(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS NVarChar(4)) + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc1' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS NVarChar(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS NVarChar(4)) + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 5 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'abc2' + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS NVarChar(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS NVarChar(4)) + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id +FETCH NEXT 2 ROWS ONLY + diff --git a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(DB2.LinqService).sql new file mode 100644 index 000000000000..03dc51fc05b5 --- /dev/null +++ b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrReplaceByTableNameAsync(DB2.LinqService).sql @@ -0,0 +1,155 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +END + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +CREATE TABLE "xxPatient" +( + "PersonID" Int NOT NULL, + "Diagnosis" NVarChar(255) NULL, + + CONSTRAINT "PK_xxPatient" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS NVarChar(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS NVarChar(4)) + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS NVarChar(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS NVarChar(4)) + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" "t1" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 1 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC1' + +MERGE INTO "xxPatient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS NVarChar(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS NVarChar(4)) + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @PersonID Integer(4) -- Int32 +SET @PersonID = 2 +DECLARE @Diagnosis VarChar(4) -- String +SET @Diagnosis = 'ABC2' + +MERGE INTO "xxPatient" "t1" +USING (SELECT CAST(@PersonID AS Int) AS "PersonID" FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = CAST(@Diagnosis AS NVarChar(4)) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@PersonID AS Int), + CAST(@Diagnosis AS NVarChar(4)) + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPatient" "t1" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "xxPatient"'; +END + diff --git a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(DB2.LinqService).sql index 23d53e07404a..994b85f68f3e 100644 --- a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3Async(DB2.LinqService).sql @@ -35,3 +35,101 @@ FROM ) ) +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 +DECLARE @i Integer(4) -- Int32 +SET @i = 0 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = RTrim(Char(CHARACTER_LENGTH("t1"."Diagnosis",CODEUNITS32) + CAST(@i AS Int))) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 +DECLARE @i Integer(4) -- Int32 +SET @i = 1 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = RTrim(Char(CHARACTER_LENGTH("t1"."Diagnosis",CODEUNITS32) + CAST(@i AS Int))) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 +DECLARE @i Integer(4) -- Int32 +SET @i = 2 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id AS Int) AS "PersonID" FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = RTrim(Char(CHARACTER_LENGTH("t1"."Diagnosis",CODEUNITS32) + CAST(@i AS Int))) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id +FETCH NEXT 2 ROWS ONLY + diff --git a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(DB2.LinqService).sql index 23d53e07404a..1269e9f79bec 100644 --- a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertOrUpdate3xAsync(DB2.LinqService).sql @@ -35,3 +35,107 @@ FROM ) ) +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id2 Integer(4) -- Int32 +SET @id2 = 5 +DECLARE @i Integer(4) -- Int32 +SET @i = 0 +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = RTrim(Char(CHARACTER_LENGTH("t1"."Diagnosis",CODEUNITS32) + CAST(@i AS Int))) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id2 Integer(4) -- Int32 +SET @id2 = 5 +DECLARE @i Integer(4) -- Int32 +SET @i = 1 +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = RTrim(Char(CHARACTER_LENGTH("t1"."Diagnosis",CODEUNITS32) + CAST(@i AS Int))) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id2 Integer(4) -- Int32 +SET @id2 = 5 +DECLARE @i Integer(4) -- Int32 +SET @i = 2 +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +MERGE INTO "Patient" "t1" +USING (SELECT CAST(@id2 AS Int) AS "PersonID" FROM SYSIBM.SYSDUMMY1 FETCH FIRST 1 ROW ONLY) "s" ON +( + "t1"."PersonID" = "s"."PersonID" +) +WHEN MATCHED THEN + UPDATE + SET + "Diagnosis" = RTrim(Char(CHARACTER_LENGTH("t1"."Diagnosis",CODEUNITS32) + CAST(@i AS Int))) +WHEN NOT MATCHED THEN + INSERT + ( + "PersonID", + "Diagnosis" + ) + VALUES + ( + CAST(@id AS Int), + 'abc' + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +SELECT + "p"."PersonID", + "p"."Diagnosis" +FROM + "Patient" "p" +WHERE + "p"."PersonID" = @id +FETCH NEXT 2 ROWS ONLY + diff --git a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(DB2.LinqService).sql index 97ddeb738cb8..4aa49aea6b2a 100644 --- a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity1Async(DB2.LinqService).sql @@ -28,6 +28,21 @@ FROM ) ) +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = 'John' AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- DB2 DB2.LUW DB2LUW diff --git a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(DB2.LinqService).sql index 97ddeb738cb8..4aa49aea6b2a 100644 --- a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity2Async(DB2.LinqService).sql @@ -28,6 +28,21 @@ FROM ) ) +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = 'John' AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- DB2 DB2.LUW DB2LUW diff --git a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(DB2.LinqService).sql index 79c0c703e342..600c6bc8efef 100644 --- a/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertWithIdentity4Async(DB2.LinqService).sql @@ -38,6 +38,23 @@ FROM ) ) +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John0' + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = @p AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- DB2 DB2.LUW DB2LUW (asynchronously) DECLARE @FirstName VarChar(5) -- String @@ -70,6 +87,23 @@ FROM ) ) +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p VarChar(5) -- String +SET @p = 'John1' + +SELECT + "p"."FirstName", + "p"."PersonID", + "p"."LastName", + "p"."MiddleName", + "p"."Gender" +FROM + "Person" "p" +WHERE + "p"."FirstName" = @p AND "p"."LastName" = 'Shepard' +FETCH NEXT 2 ROWS ONLY + BeforeExecute -- DB2 DB2.LUW DB2LUW diff --git a/DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(DB2.LinqService).sql index 72f7c42123e0..bcfadb4f781a 100644 --- a/DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromQueryAsyn(DB2.LinqService).sql @@ -218,6 +218,45 @@ VALUES @Field4 ) +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" + WHERE + "t1"."Id" = 5 +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- DB2 DB2.LUW DB2LUW diff --git a/DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(DB2.LinqService).sql index 72f7c42123e0..4612b208238d 100644 --- a/DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.SameSourceInsertFromTableAsyn(DB2.LinqService).sql @@ -218,6 +218,43 @@ VALUES @Field4 ) +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +MERGE INTO "TestMerge1" "Target" +USING ( + SELECT + "t1"."Id" as "source_Id", + "t1"."Field1" as "source_Field1", + "t1"."Field2" as "source_Field2", + "t1"."Field4" as "source_Field4" + FROM + "TestMerge2" "t1" +) "Source" +( + "source_Id", + "source_Field1", + "source_Field2", + "source_Field4" +) +ON ("Target"."Id" = "Source"."source_Id") + +WHEN NOT MATCHED THEN +INSERT +( + "Id", + "Field1", + "Field2", + "Field4" +) +VALUES +( + "Source"."source_Id", + "Source"."source_Field1", + "Source"."source_Field2", + "Source"."source_Field4" +) + BeforeExecute -- DB2 DB2.LUW DB2LUW diff --git a/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(DB2.LinqService).sql new file mode 100644 index 000000000000..0aa65020ed02 --- /dev/null +++ b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(DB2.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @ParentID Integer(4) -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer(4) -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @ParentID Integer(4) -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @ParentID Integer(4) -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" "p" +SET + "ParentID" = "p"."ParentID" + 1 +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @p + diff --git a/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(DB2.LinqService).sql new file mode 100644 index 000000000000..0aa65020ed02 --- /dev/null +++ b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(DB2.LinqService).sql @@ -0,0 +1,54 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @ParentID Integer(4) -- Int32 +SET @ParentID = 1001 +DECLARE @Value1 Integer(4) -- Int32 +SET @Value1 = 1001 + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + @ParentID, + @Value1 +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @ParentID Integer(4) -- Int32 +SET @ParentID = 1001 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @ParentID Integer(4) -- Int32 +SET @ParentID = 1001 + +UPDATE + "Parent" "p" +SET + "ParentID" = "p"."ParentID" + 1 +WHERE + "p"."ParentID" = @ParentID + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Parent" "p" +WHERE + "p"."ParentID" = @p + diff --git a/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(DB2.LinqService).sql new file mode 100644 index 000000000000..e6192a58caa1 --- /dev/null +++ b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update4Async(DB2.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +INSERT INTO "Child" +( + "ParentID", + "ChildID" +) +VALUES +( + 1, + @id +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @id + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 1001 + +UPDATE + "Child" +SET + "ChildID" = "Child"."ChildID" + 1 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "c_1" + LEFT JOIN "Parent" "a_Parent" ON "c_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "c_1"."ChildID" = @id AND + "a_Parent"."Value1" = 1 AND + "Child"."ParentID" = "c_1"."ParentID" AND + "Child"."ChildID" = "c_1"."ChildID" + ) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @p Integer(4) -- Int32 +SET @p = 1002 + +SELECT + COUNT(*) +FROM + "Child" "c_1" +WHERE + "c_1"."ChildID" = @p + diff --git a/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(DB2.LinqService).sql new file mode 100644 index 000000000000..c2ddc459b4c2 --- /dev/null +++ b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1Async(DB2.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "child_1" + LEFT JOIN "Parent" "a_Parent" ON "child_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "child_1"."ChildID" = 10000 AND "Parent"."ParentID" = "a_Parent"."ParentID" AND + ("Parent"."Value1" = "a_Parent"."Value1" OR "Parent"."Value1" IS NULL AND "a_Parent"."Value1" IS NULL) + ) + diff --git a/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(DB2.LinqService).sql new file mode 100644 index 000000000000..c2ddc459b4c2 --- /dev/null +++ b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateAssociation1AsyncOld(DB2.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +INSERT INTO "Parent" +( + "ParentID", + "Value1" +) +VALUES +( + 20000, + 20000 +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +INSERT INTO "Child" +( + "ChildID", + "ParentID" +) +VALUES +( + 10000, + 20000 +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +UPDATE + "Parent" +SET + "Value1" = 5 +WHERE + EXISTS( + SELECT + * + FROM + "Child" "child_1" + LEFT JOIN "Parent" "a_Parent" ON "child_1"."ParentID" = "a_Parent"."ParentID" + WHERE + "child_1"."ChildID" = 10000 AND "Parent"."ParentID" = "a_Parent"."ParentID" AND + ("Parent"."Value1" = "a_Parent"."Value1" OR "Parent"."Value1" IS NULL AND "a_Parent"."Value1" IS NULL) + ) + diff --git a/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(DB2.LinqService).sql new file mode 100644 index 000000000000..3f324e7b6a0c --- /dev/null +++ b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(DB2.LinqService).sql @@ -0,0 +1,110 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +BEGIN + DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN END; + EXECUTE IMMEDIATE 'DROP TABLE "xxPerson"'; +END + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +CREATE TABLE "xxPerson" +( + "FirstName" NVarChar(255) NOT NULL, + "PersonID" Int GENERATED ALWAYS AS IDENTITY NOT NULL, + "LastName" NVarChar(255) NOT NULL, + "MiddleName" NVarChar(255) NULL, + "Gender" Char(1) NOT NULL, + + CONSTRAINT "PK_xxPerson" PRIMARY KEY ("PersonID") +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar -- String +SET @MiddleName = NULL +DECLARE @Gender Char(1) -- StringFixedLength +SET @Gender = 'M' + +INSERT INTO "xxPerson" +( + "FirstName", + "LastName", + "MiddleName", + "Gender" +) +VALUES +( + @FirstName, + @LastName, + @MiddleName, + @Gender +) + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + COUNT(*) +FROM + "xxPerson" "t1" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson" "t1" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @FirstName VarChar(6) -- String +SET @FirstName = 'Steven' +DECLARE @LastName VarChar(4) -- String +SET @LastName = 'King' +DECLARE @MiddleName VarChar(4) -- String +SET @MiddleName = 'None' +DECLARE @Gender Char(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @ID Integer(4) -- Int32 +SET @ID = 1 + +UPDATE + "xxPerson" "t1" +SET + "FirstName" = @FirstName, + "LastName" = @LastName, + "MiddleName" = @MiddleName, + "Gender" = @Gender +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."FirstName", + "t1"."PersonID", + "t1"."LastName", + "t1"."MiddleName", + "t1"."Gender" +FROM + "xxPerson" "t1" +FETCH NEXT 2 ROWS ONLY + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +DROP TABLE "xxPerson" + diff --git a/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(DB2.LinqService).sql b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(DB2.LinqService).sql index 71fe520cfdf4..321717784332 100644 --- a/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(DB2.LinqService).sql +++ b/DB2.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(DB2.LinqService).sql @@ -35,3 +35,60 @@ FROM ) ) +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +SELECT + "t1"."PersonID", + "t1"."Gender", + "t1"."FirstName", + "t1"."MiddleName", + "t1"."LastName" +FROM + "Person" "t1" +WHERE + "t1"."PersonID" = @id +FETCH NEXT 1 ROWS ONLY + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @Gender Char(1) -- StringFixedLength +SET @Gender = 'M' +DECLARE @Name_FirstName VarChar(13) -- String +SET @Name_FirstName = 'UpdateComplex' +DECLARE @Name_MiddleName VarChar -- String +SET @Name_MiddleName = NULL +DECLARE @Name_LastName VarChar(13) -- String +SET @Name_LastName = 'UpdateComplex' +DECLARE @ID Integer(4) -- Int32 +SET @ID = 5 + +UPDATE + "Person" "t1" +SET + "Gender" = @Gender, + "FirstName" = @Name_FirstName, + "MiddleName" = @Name_MiddleName, + "LastName" = @Name_LastName +WHERE + "t1"."PersonID" = @ID + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) +DECLARE @id Integer(4) -- Int32 +SET @id = 5 + +SELECT + "t1"."PersonID", + "t1"."Gender", + "t1"."FirstName", + "t1"."MiddleName", + "t1"."LastName" +FROM + "Person" "t1" +WHERE + "t1"."PersonID" = @id +FETCH NEXT 1 ROWS ONLY + diff --git a/DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(DB2).sql b/DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(DB2).sql new file mode 100644 index 000000000000..afe2677f5982 --- /dev/null +++ b/DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(DB2).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(DB2).sql b/DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(DB2).sql new file mode 100644 index 000000000000..f1a7ec48bc58 --- /dev/null +++ b/DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(DB2).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + diff --git a/DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(DB2).sql b/DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(DB2).sql new file mode 100644 index 000000000000..f1a7ec48bc58 --- /dev/null +++ b/DB2/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(DB2).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW (asynchronously) + +SELECT + "t1"."ParentID", + "t1"."Value1" +FROM + "Parent" "t1" + From 798ad966991eeef37462fa722515224a21fde49c Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Thu, 20 Feb 2025 07:57:00 +0000 Subject: [PATCH 37/40] [Linux / ClickHouse Client] baselines --- ...t_Async(ClickHouse.Client.LinqService).sql | 12 + ...l4Async(ClickHouse.Client.LinqService).sql | 13 ++ ...y2Async(ClickHouse.Client.LinqService).sql | 36 +++ ...le1Test(ClickHouse.Client.LinqService).sql | 9 + ...le2Test(ClickHouse.Client.LinqService).sql | 11 + ...st1Test(ClickHouse.Client.LinqService).sql | 9 + ...st2Test(ClickHouse.Client.LinqService).sql | 11 + ...yncTest(ClickHouse.Client.LinqService).sql | 15 ++ ...yncTest(ClickHouse.Client.LinqService).sql | 15 ++ ...kipTest(ClickHouse.Client.LinqService).sql | 12 + ...Default(ClickHouse.Client.LinqService).sql | 12 + ...yncTest(ClickHouse.Client.LinqService).sql | 21 ++ ...yncTest(ClickHouse.Client.LinqService).sql | 21 ++ ...stAsync(ClickHouse.Client.LinqService).sql | 26 +++ ...tAsync2(ClickHouse.Client.LinqService).sql | 26 +++ ...ncdTest(ClickHouse.Client.LinqService).sql | 14 ++ ...t3Async(ClickHouse.Client.LinqService).sql | 24 ++ ...stAsync(ClickHouse.Client.LinqService).sql | 30 +++ ...stAsync(ClickHouse.Client.LinqService).sql | 20 ++ ...tAsync2(ClickHouse.Client.LinqService).sql | 20 ++ ...tAsync1(ClickHouse.Client.LinqService).sql | 24 ++ ...tAsync2(ClickHouse.Client.LinqService).sql | 24 ++ ...stAsync(ClickHouse.Client.LinqService).sql | 20 ++ ...tAsync2(ClickHouse.Client.LinqService).sql | 20 ++ ...llAsync(ClickHouse.Client.LinqService).sql | 151 +------------ ...nyAsync(ClickHouse.Client.LinqService).sql | 151 +------------ ...teAsync(ClickHouse.Client.LinqService).sql | 151 +------------ ...yncLong(ClickHouse.Client.LinqService).sql | 148 +----------- ...nsAsync(ClickHouse.Client.LinqService).sql | 153 ++----------- ...ntAsync(ClickHouse.Client.LinqService).sql | 148 +----------- ...teAsync(ClickHouse.Client.LinqService).sql | 148 +----------- ...stAsync(ClickHouse.Client.LinqService).sql | 150 +----------- ...ltAsync(ClickHouse.Client.LinqService).sql | 150 +----------- ...teAsync(ClickHouse.Client.LinqService).sql | 150 +----------- ...teAsync(ClickHouse.Client.LinqService).sql | 150 +----------- ...ntAsync(ClickHouse.Client.LinqService).sql | 148 +----------- ...teAsync(ClickHouse.Client.LinqService).sql | 148 +----------- ...axAsync(ClickHouse.Client.LinqService).sql | 148 +----------- ...orAsync(ClickHouse.Client.LinqService).sql | 148 +----------- ...inAsync(ClickHouse.Client.LinqService).sql | 148 +----------- ...orAsync(ClickHouse.Client.LinqService).sql | 148 +----------- ...leAsync(ClickHouse.Client.LinqService).sql | 150 +----------- ...ltAsync(ClickHouse.Client.LinqService).sql | 150 +----------- ...teAsync(ClickHouse.Client.LinqService).sql | 150 +----------- ...teAsync(ClickHouse.Client.LinqService).sql | 150 +----------- ...Decimal(ClickHouse.Client.LinqService).sql | 148 +----------- ...ecimalN(ClickHouse.Client.LinqService).sql | 148 +----------- ...cDouble(ClickHouse.Client.LinqService).sql | 148 +----------- ...DoubleN(ClickHouse.Client.LinqService).sql | 148 +----------- ...ncFloat(ClickHouse.Client.LinqService).sql | 148 +----------- ...cFloatN(ClickHouse.Client.LinqService).sql | 148 +----------- ...syncInt(ClickHouse.Client.LinqService).sql | 148 +----------- ...yncIntN(ClickHouse.Client.LinqService).sql | 148 +----------- ...yncLong(ClickHouse.Client.LinqService).sql | 148 +----------- ...ncLongN(ClickHouse.Client.LinqService).sql | 148 +----------- ...Decimal(ClickHouse.Client.LinqService).sql | 148 +----------- ...ecimalN(ClickHouse.Client.LinqService).sql | 148 +----------- ...rDouble(ClickHouse.Client.LinqService).sql | 148 +----------- ...DoubleN(ClickHouse.Client.LinqService).sql | 148 +----------- ...orFloat(ClickHouse.Client.LinqService).sql | 148 +----------- ...rFloatN(ClickHouse.Client.LinqService).sql | 148 +----------- ...ctorInt(ClickHouse.Client.LinqService).sql | 148 +----------- ...torIntN(ClickHouse.Client.LinqService).sql | 148 +----------- ...torLong(ClickHouse.Client.LinqService).sql | 148 +----------- ...orLongN(ClickHouse.Client.LinqService).sql | 148 +----------- ...t1Async(ClickHouse.Client.LinqService).sql | 19 ++ ...ntAsync(ClickHouse.Client.LinqService).sql | 65 ++++++ ...edAsync(ClickHouse.Client.LinqService).sql | 54 +++++ ...t1Async(ClickHouse.Client.LinqService).sql | 8 + ...t2Async(ClickHouse.Client.LinqService).sql | 10 + ...sue4602(ClickHouse.Client.LinqService).sql | 52 +---- ...7_Async(ClickHouse.Client.LinqService).sql | 31 +++ ...saction(ClickHouse.Client.LinqService).sql | 31 +++ ...t1Async(ClickHouse.Client.LinqService).sql | 11 + ...18Async(ClickHouse.Client.LinqService).sql | 13 ++ ...r1Async(ClickHouse.Client.LinqService).sql | 6 + ...132Test(ClickHouse.Client.LinqService).sql | 213 ++++++++++++++++++ ...c(ClickHouse.Client.LinqService,False).sql | 14 ++ ...nc(ClickHouse.Client.LinqService,True).sql | 14 ++ ...c(ClickHouse.Client.LinqService,False).sql | 14 ++ ...nc(ClickHouse.Client.LinqService,True).sql | 14 ++ ...p1Async(ClickHouse.Client.LinqService).sql | 74 +----- ...c(ClickHouse.Client.LinqService,False).sql | 20 ++ ...nc(ClickHouse.Client.LinqService,True).sql | 20 ++ ...c(ClickHouse.Client.LinqService,False).sql | 10 + ...nc(ClickHouse.Client.LinqService,True).sql | 10 + ...c(ClickHouse.Client.LinqService,False).sql | 12 + ...nc(ClickHouse.Client.LinqService,True).sql | 12 + ...c(ClickHouse.Client.LinqService,False).sql | 12 + ...nc(ClickHouse.Client.LinqService,True).sql | 12 + ...c(ClickHouse.Client.LinqService,False).sql | 10 + ...nc(ClickHouse.Client.LinqService,True).sql | 10 + ....Client.LinqService,False,False,False).sql | 18 ++ ...e.Client.LinqService,False,False,True).sql | 18 ++ ...e.Client.LinqService,False,True,False).sql | 18 ++ ...se.Client.LinqService,False,True,True).sql | 18 ++ ...e.Client.LinqService,True,False,False).sql | 18 ++ ...se.Client.LinqService,True,False,True).sql | 18 ++ ...se.Client.LinqService,True,True,False).sql | 18 ++ ...use.Client.LinqService,True,True,True).sql | 18 ++ ...e1Async(ClickHouse.Client.LinqService).sql | 36 +++ ...leAsync(ClickHouse.Client.LinqService).sql | 31 +++ ...meAsync(ClickHouse.Client.LinqService).sql | 83 +++++++ ...t2Async(ClickHouse.Client.LinqService).sql | 40 ++++ ...t3Async(ClickHouse.Client.LinqService).sql | 42 ++++ ...t4Async(ClickHouse.Client.LinqService).sql | 42 ++++ ...meAsync(ClickHouse.Client.LinqService).sql | 46 ++++ ...e1Async(ClickHouse.Client.LinqService).sql | 44 ++++ ...e2Async(ClickHouse.Client.LinqService).sql | 44 ++++ ...meAsync(ClickHouse.Client.LinqService).sql | 93 ++++++++ ...x1Async(ClickHouse.Client.LinqService).sql | 43 ++++ ...inq.AsyncTests.Test(ClickHouse.Client).sql | 18 ++ ...nq.AsyncTests.Test1(ClickHouse.Client).sql | 9 + ...ncTests.TestForEach(ClickHouse.Client).sql | 9 + 114 files changed, 2190 insertions(+), 5848 deletions(-) create mode 100644 ClickHouse.Client.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Client.LinqService,False).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Client.LinqService,True).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Client.LinqService,False).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Client.LinqService,True).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Client.LinqService,False).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Client.LinqService,True).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Client.LinqService,False).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Client.LinqService,True).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Client.LinqService,False).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Client.LinqService,True).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Client.LinqService,False).sql create mode 100644 ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Client.LinqService,True).sql create mode 100644 ClickHouse.Client.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(ClickHouse.Client.LinqService).sql create mode 100644 ClickHouse.Client/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(ClickHouse.Client).sql create mode 100644 ClickHouse.Client/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(ClickHouse.Client).sql create mode 100644 ClickHouse.Client/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(ClickHouse.Client).sql diff --git a/ClickHouse.Client.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..f0337297793e --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + Person t1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..bff6448d01ee --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID <= 3 + ) + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..d0ca6f78de06 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + m_1.ParentID, + t2.ParentID_1, + t2.ChildID +FROM + ( + SELECT DISTINCT + a_Parent1.ParentID as ParentID + FROM + Child t1 + INNER JOIN Parent a_Parent1 ON t1.ParentID = a_Parent1.ParentID + ) m_1 + INNER JOIN ( + SELECT + a_Parent1_1.ParentID as ParentID, + d.ParentID as ParentID_1, + d.ChildID as ChildID + FROM + Child d + INNER JOIN Parent a_Parent1_1 ON d.ParentID = a_Parent1_1.ParentID + ) t2 ON m_1.ParentID = t2.ParentID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + a_Parent1.ParentID +FROM + Child t1 + INNER JOIN Parent a_Parent1 ON t1.ParentID = a_Parent1.ParentID +GROUP BY + a_Parent1.ParentID + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..66cf6578d327 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(ClickHouse.Client.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..f6f2220d73f9 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(ClickHouse.Client.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID > 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..66cf6578d327 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(ClickHouse.Client.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..f6f2220d73f9 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(ClickHouse.Client.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID > 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..e9ed640dec99 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(ClickHouse.Client.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + CASE + WHEN 1 IN ( + SELECT + t1.PersonID + FROM + Person t1 + ) + THEN true + ELSE false + END + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..0c08db005a65 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(ClickHouse.Client.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + p.FirstName, + p.PersonID, + p.LastName, + p.MiddleName, + p.Gender +FROM + Person p +WHERE + p.PersonID = 1 +LIMIT 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(ClickHouse.Client.LinqService).sql index 3e8919cd72aa..727eb3a0fb87 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(ClickHouse.Client.LinqService).sql @@ -10,3 +10,15 @@ ORDER BY t1.ParentID LIMIT 1, 2 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 +ORDER BY + t1.ParentID +LIMIT 1, 2 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..180547f3d083 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(ClickHouse.Client.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + o.ParentID, + o.Value1 +FROM + Parent o +WHERE + o.ParentID IN (1, 2, 3) OR o.ParentID = 4 +LIMIT 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..195bb6011752 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(ClickHouse.Client.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +ORDER BY + t1.ParentID, + t1.ChildID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..195bb6011752 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(ClickHouse.Client.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +ORDER BY + t1.ParentID, + t1.ChildID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..7ffc6405b9fd --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(ClickHouse.Client.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = 1 + ) + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = -1 + ) + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..7ffc6405b9fd --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(ClickHouse.Client.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = 1 + ) + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = -1 + ) + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..03b53a119d4b --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(ClickHouse.Client.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID = 1 +ORDER BY + x.ParentID DESC +LIMIT 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..7e8d667dcbc8 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 1 +LIMIT 1 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 2 +LIMIT 2 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..b01719daf906 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(ClickHouse.Client.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + CASE + WHEN 1 IN ( + SELECT + c_1.ParentID + FROM + Child c_1 + ) + THEN true + ELSE false + END + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + CASE + WHEN -1 IN ( + SELECT + c_1.ParentID + FROM + Child c_1 + ) + THEN true + ELSE false + END + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..881b9564c8a4 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(ClickHouse.Client.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = 1 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = -1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..881b9564c8a4 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(ClickHouse.Client.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = 1 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = -1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..e3c64b813264 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(ClickHouse.Client.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 1 +LIMIT 1 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 2 +LIMIT 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..e3c64b813264 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(ClickHouse.Client.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 1 +LIMIT 1 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 2 +LIMIT 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..13956d22faf3 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(ClickHouse.Client.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = 1 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = -1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..13956d22faf3 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(ClickHouse.Client.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = 1 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = -1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..5696cc56961c 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,13 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + AsyncDataTable c_1 + WHERE + c_1.Id <> 2 + ) diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..25c01eeb0315 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,13 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + AsyncDataTable c_1 + WHERE + c_1.Id = 2 + ) diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..25c01eeb0315 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,13 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + AsyncDataTable c_1 + WHERE + c_1.Id = 2 + ) diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(ClickHouse.Client.LinqService).sql index 180e2f57c6af..49e00b462d16 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + avgOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..bfb7567067bb 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,15 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + CASE + WHEN 2 IN ( + SELECT + c_1.Id + FROM + AsyncDataTable c_1 + ) + THEN true + ELSE false + END diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..e720d4ad237a 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..e720d4ad237a 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..26375ee7b34c 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 1 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..26375ee7b34c 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 1 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..26375ee7b34c 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 1 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..26375ee7b34c 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 1 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..e720d4ad237a 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..e720d4ad237a 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..ac17c24e34d9 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > 2 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..ac17c24e34d9 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > 2 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..ef11de04040f 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + minOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > 2 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..ef11de04040f 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + minOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > 2 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..20dd02834389 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 2 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..20dd02834389 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 2 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..20dd02834389 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 2 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(ClickHouse.Client.LinqService).sql index 180e2f57c6af..20dd02834389 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(ClickHouse.Client.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 2 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(ClickHouse.Client.LinqService).sql index 180e2f57c6af..9f00e9b2eb59 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toDecimal128(c_1.Id, 10)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(ClickHouse.Client.LinqService).sql index 180e2f57c6af..9f00e9b2eb59 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toDecimal128(c_1.Id, 10)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(ClickHouse.Client.LinqService).sql index 180e2f57c6af..826e4fd31fc1 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(ClickHouse.Client.LinqService).sql index 180e2f57c6af..826e4fd31fc1 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(ClickHouse.Client.LinqService).sql index 180e2f57c6af..b507443d50ef 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat32(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(ClickHouse.Client.LinqService).sql index 180e2f57c6af..b507443d50ef 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat32(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(ClickHouse.Client.LinqService).sql index 180e2f57c6af..9ed45fedfc0e 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(ClickHouse.Client.LinqService).sql index 180e2f57c6af..9ed45fedfc0e 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(ClickHouse.Client.LinqService).sql index 180e2f57c6af..017f872ce96e 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(ClickHouse.Client.LinqService).sql index 180e2f57c6af..017f872ce96e 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(ClickHouse.Client.LinqService).sql index 180e2f57c6af..9f00e9b2eb59 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toDecimal128(c_1.Id, 10)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(ClickHouse.Client.LinqService).sql index 180e2f57c6af..9f00e9b2eb59 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toDecimal128(c_1.Id, 10)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(ClickHouse.Client.LinqService).sql index 180e2f57c6af..826e4fd31fc1 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(ClickHouse.Client.LinqService).sql index 180e2f57c6af..826e4fd31fc1 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(ClickHouse.Client.LinqService).sql index 180e2f57c6af..b507443d50ef 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat32(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(ClickHouse.Client.LinqService).sql index 180e2f57c6af..b507443d50ef 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat32(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(ClickHouse.Client.LinqService).sql index 180e2f57c6af..9ed45fedfc0e 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(ClickHouse.Client.LinqService).sql index 180e2f57c6af..9ed45fedfc0e 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(ClickHouse.Client.LinqService).sql index 180e2f57c6af..017f872ce96e 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(ClickHouse.Client.LinqService).sql index 180e2f57c6af..017f872ce96e 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(ClickHouse.Client.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + sumOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..8c53d76b869a --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID = 1 +UNION ALL +SELECT + p_1.ParentID as ParentID, + p_1.Value1 as Value1 +FROM + Parent p_1 +WHERE + p_1.ParentID = 2 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(ClickHouse.Client.LinqService).sql index 660e5246b592..81f67696d466 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(ClickHouse.Client.LinqService).sql @@ -1,4 +1,20 @@ BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +INSERT INTO ConcurrencyAutoIncrement +( + Id, + Stamp, + Value +) +VALUES +( + 1, + -10, + 'initial' +) + +BeforeExecute -- ClickHouse.Client ClickHouse SELECT @@ -8,6 +24,17 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +UPDATE + Stamp = Stamp + 1, + Value = 'value 1' +WHERE + Id = 1 AND Stamp = -10 + BeforeExecute -- ClickHouse.Client ClickHouse @@ -18,6 +45,17 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +UPDATE + Stamp = Stamp + 1, + Value = 'value 2' +WHERE + Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.Client ClickHouse @@ -28,6 +66,17 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +UPDATE + Stamp = Stamp + 1, + Value = 'value 3' +WHERE + Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.Client ClickHouse @@ -38,6 +87,14 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +DELETE WHERE + Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.Client ClickHouse @@ -48,6 +105,14 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +DELETE WHERE + Id = 1 AND Stamp = -8 + BeforeExecute -- ClickHouse.Client ClickHouse diff --git a/ClickHouse.Client.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(ClickHouse.Client.LinqService).sql index b94b3a0327e4..aa91a45fe69e 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(ClickHouse.Client.LinqService).sql @@ -1,4 +1,20 @@ BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +INSERT INTO ConcurrencyFiltered +( + Id, + Stamp, + Value +) +VALUES +( + 1, + -10, + 'initial' +) + +BeforeExecute -- ClickHouse.Client ClickHouse SELECT @@ -8,6 +24,17 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyFiltered +UPDATE + Stamp = Stamp + 1, + Value = 'value 1' +WHERE + Id = 2 AND Id = 1 AND Stamp = -10 + BeforeExecute -- ClickHouse.Client ClickHouse @@ -18,6 +45,17 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyFiltered +UPDATE + Stamp = Stamp + 1, + Value = 'value 2' +WHERE + Id = 1 AND Id = 1 AND Stamp = -10 + BeforeExecute -- ClickHouse.Client ClickHouse @@ -28,6 +66,14 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyFiltered +DELETE WHERE + Id = 2 AND Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.Client ClickHouse @@ -38,6 +84,14 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyFiltered +DELETE WHERE + Id = 1 AND Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.Client ClickHouse diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..ecadeb6e92d0 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent t1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..9639f6bd8889 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID > 2 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(ClickHouse.Client.LinqService).sql index acb1f8999822..1ba1a2f086e8 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(ClickHouse.Client.LinqService).sql @@ -1,45 +1,11 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS DynamicParent - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS DynamicParent -( - ID Int32, - - PRIMARY KEY (ID) -) -ENGINE = MergeTree() -ORDER BY ID - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS DynamicChild - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS DynamicChild -( - ID Int32, - ParentID Int32, - - PRIMARY KEY (ID) -) -ENGINE = MergeTree() -ORDER BY ID - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS DynamicChild - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS DynamicParent +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + it.ID +FROM + DynamicParent it + LEFT JOIN DynamicChild a_Child ON it.ID = a_Child.ParentID +WHERE + a_Child.ID = 123 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(ClickHouse.Client.LinqService).sql index b60bef5fa897..5f3d2fbc3e14 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(ClickHouse.Client.LinqService).sql @@ -60,3 +60,34 @@ WHERE x.ParentID = 3 LIMIT 1 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + m_1.ParentID, + d.ParentID, + d.ChildID +FROM + ( + SELECT + x.ParentID as ParentID + FROM + Parent x + WHERE + x.ParentID = 3 + LIMIT 1 + ) m_1 + INNER JOIN Child d ON m_1.ParentID = d.ParentID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID = 3 +LIMIT 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(ClickHouse.Client.LinqService).sql index b60bef5fa897..5f3d2fbc3e14 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(ClickHouse.Client.LinqService).sql @@ -60,3 +60,34 @@ WHERE x.ParentID = 3 LIMIT 1 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + m_1.ParentID, + d.ParentID, + d.ChildID +FROM + ( + SELECT + x.ParentID as ParentID + FROM + Parent x + WHERE + x.ParentID = 3 + LIMIT 1 + ) m_1 + INNER JOIN Child d ON m_1.ParentID = d.ParentID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID = 3 +LIMIT 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..d75595d600fe --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 +WHERE + t1.Value1 = 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..a2f1c92d98ce --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT DISTINCT + p1.PersonID, + p1.Gender, + p1.FirstName, + p1.LastName +FROM + Person p1 +WHERE + p1.PersonID IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND p1.Gender = 'F' + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..72442313bcc5 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..5f634a4e95b1 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(ClickHouse.Client.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + x.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x +WHERE + x.MiddleName IS NOT NULL +GROUP BY + x.MiddleName +UNION ALL +SELECT + x_1.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_1 +WHERE + x_1.MiddleName IS NOT NULL +GROUP BY + x_1.MiddleName +UNION ALL +SELECT + x_2.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_2 +WHERE + x_2.MiddleName IS NOT NULL +GROUP BY + x_2.MiddleName +UNION ALL +SELECT + x_3.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_3 +WHERE + x_3.MiddleName IS NOT NULL +GROUP BY + x_3.MiddleName +UNION ALL +SELECT + x_4.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_4 +WHERE + x_4.MiddleName IS NOT NULL +GROUP BY + x_4.MiddleName +UNION ALL +SELECT + x_5.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_5 +WHERE + x_5.MiddleName IS NOT NULL +GROUP BY + x_5.MiddleName +UNION ALL +SELECT + x_6.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_6 +WHERE + x_6.MiddleName IS NOT NULL +GROUP BY + x_6.MiddleName +UNION ALL +SELECT + x_7.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_7 +WHERE + x_7.MiddleName IS NOT NULL +GROUP BY + x_7.MiddleName +UNION ALL +SELECT + x_8.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_8 +WHERE + x_8.MiddleName IS NOT NULL +GROUP BY + x_8.MiddleName +UNION ALL +SELECT + x_9.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_9 +WHERE + x_9.MiddleName IS NOT NULL +GROUP BY + x_9.MiddleName +UNION ALL +SELECT + x_10.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_10 +WHERE + x_10.MiddleName IS NOT NULL +GROUP BY + x_10.MiddleName +UNION ALL +SELECT + x_11.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_11 +WHERE + x_11.MiddleName IS NOT NULL +GROUP BY + x_11.MiddleName +UNION ALL +SELECT + x_12.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_12 +WHERE + x_12.MiddleName IS NOT NULL +GROUP BY + x_12.MiddleName +UNION ALL +SELECT + x_13.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_13 +WHERE + x_13.MiddleName IS NOT NULL +GROUP BY + x_13.MiddleName +UNION ALL +SELECT + x_14.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_14 +WHERE + x_14.MiddleName IS NOT NULL +GROUP BY + x_14.MiddleName +UNION ALL +SELECT + x_15.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_15 +WHERE + x_15.MiddleName IS NOT NULL +GROUP BY + x_15.MiddleName +UNION ALL +SELECT + x_16.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_16 +WHERE + x_16.MiddleName IS NOT NULL +GROUP BY + x_16.MiddleName +UNION ALL +SELECT + x_17.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_17 +WHERE + x_17.MiddleName IS NOT NULL +GROUP BY + x_17.MiddleName +UNION ALL +SELECT + x_18.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_18 +WHERE + x_18.MiddleName IS NOT NULL +GROUP BY + x_18.MiddleName +UNION ALL +SELECT + x_19.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_19 +WHERE + x_19.MiddleName IS NOT NULL +GROUP BY + x_19.MiddleName +UNION ALL +SELECT + x_20.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_20 +WHERE + x_20.MiddleName IS NOT NULL +GROUP BY + x_20.MiddleName + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Client.LinqService,False).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Client.LinqService,False).sql new file mode 100644 index 000000000000..c4ea19170888 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Client.LinqService,False).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID +LIMIT 3, 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Client.LinqService,True).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Client.LinqService,True).sql new file mode 100644 index 000000000000..c4ea19170888 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Client.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID +LIMIT 3, 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Client.LinqService,False).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Client.LinqService,False).sql new file mode 100644 index 000000000000..c4ea19170888 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Client.LinqService,False).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID +LIMIT 3, 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Client.LinqService,True).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Client.LinqService,True).sql new file mode 100644 index 000000000000..c4ea19170888 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Client.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID +LIMIT 3, 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(ClickHouse.Client.LinqService).sql index d986dddf830c..345043772342 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(ClickHouse.Client.LinqService).sql @@ -1,67 +1,11 @@ BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS TakeSkipClass - -BeforeExecute --- ClickHouse.Client ClickHouse - -CREATE TABLE IF NOT EXISTS TakeSkipClass -( - Value Nullable(String) -) -ENGINE = Memory() - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO TakeSkipClass -( - Value -) -VALUES -( - 'PLUTO' -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO TakeSkipClass -( - Value -) -VALUES -( - 'PIPPO' -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO TakeSkipClass -( - Value -) -VALUES -( - 'PLUTO' -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -INSERT INTO TakeSkipClass -( - Value -) -VALUES -( - 'BOLTO' -) - -BeforeExecute --- ClickHouse.Client ClickHouse - -DROP TABLE IF EXISTS TakeSkipClass +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.Value +FROM + TakeSkipClass t1 +ORDER BY + t1.Value +LIMIT 3, 18446744073709551615 diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Client.LinqService,False).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Client.LinqService,False).sql index a40e67770624..55195b8bb386 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Client.LinqService,False).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Client.LinqService,False).sql @@ -18,3 +18,23 @@ FROM Child ch LIMIT 3 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +LIMIT 2 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +LIMIT 3 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Client.LinqService,True).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Client.LinqService,True).sql index a40e67770624..55195b8bb386 100644 --- a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Client.LinqService,True).sql +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Client.LinqService,True).sql @@ -18,3 +18,23 @@ FROM Child ch LIMIT 3 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +LIMIT 2 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +LIMIT 3 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Client.LinqService,False).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Client.LinqService,False).sql new file mode 100644 index 000000000000..bf4fc35f95d4 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Client.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +LIMIT 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Client.LinqService,True).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Client.LinqService,True).sql new file mode 100644 index 000000000000..bf4fc35f95d4 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Client.LinqService,True).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +LIMIT 1 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Client.LinqService,False).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Client.LinqService,False).sql new file mode 100644 index 000000000000..d73a28e593bd --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Client.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID > 3 OR ch.ChildID < 4 +LIMIT 3 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Client.LinqService,True).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Client.LinqService,True).sql new file mode 100644 index 000000000000..d73a28e593bd --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Client.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID > 3 OR ch.ChildID < 4 +LIMIT 3 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Client.LinqService,False).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Client.LinqService,False).sql new file mode 100644 index 000000000000..97f278a7cb38 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Client.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID >= 0 AND ch.ChildID <= 100 +LIMIT 3 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Client.LinqService,True).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Client.LinqService,True).sql new file mode 100644 index 000000000000..97f278a7cb38 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Client.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID >= 0 AND ch.ChildID <= 100 +LIMIT 3 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Client.LinqService,False).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Client.LinqService,False).sql new file mode 100644 index 000000000000..491eed2b5d6d --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Client.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +LIMIT 3 + diff --git a/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Client.LinqService,True).sql b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Client.LinqService,True).sql new file mode 100644 index 000000000000..491eed2b5d6d --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Client.LinqService,True).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +LIMIT 3 + diff --git a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,False,False).sql b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,False,False).sql index 81052207f882..3c7408ea982f 100644 --- a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,False,False).sql +++ b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,False,False).sql @@ -3,3 +3,21 @@ DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +CREATE TABLE Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,False,True).sql b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,False,True).sql index 81052207f882..3c7408ea982f 100644 --- a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,False,True).sql +++ b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,False,True).sql @@ -3,3 +3,21 @@ DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +CREATE TABLE Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,True,False).sql b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,True,False).sql index 99ac6569088b..dd1301976800 100644 --- a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,True,False).sql +++ b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,True,False).sql @@ -12,3 +12,21 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +CREATE TABLE testdb2.Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,True,True).sql b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,True,True).sql index 99ac6569088b..dd1301976800 100644 --- a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,True,True).sql +++ b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,False,True,True).sql @@ -12,3 +12,21 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +CREATE TABLE testdb2.Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,False,False).sql b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,False,False).sql index 81052207f882..3c7408ea982f 100644 --- a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,False,False).sql +++ b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,False,False).sql @@ -3,3 +3,21 @@ DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +CREATE TABLE Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,False,True).sql b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,False,True).sql index 81052207f882..3c7408ea982f 100644 --- a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,False,True).sql +++ b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,False,True).sql @@ -3,3 +3,21 @@ DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +CREATE TABLE Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,True,False).sql b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,True,False).sql index 99ac6569088b..dd1301976800 100644 --- a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,True,False).sql +++ b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,True,False).sql @@ -12,3 +12,21 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +CREATE TABLE testdb2.Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,True,True).sql b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,True,True).sql index 99ac6569088b..dd1301976800 100644 --- a/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,True,True).sql +++ b/ClickHouse.Client.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Client.LinqService,True,True,True).sql @@ -12,3 +12,21 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +CREATE TABLE testdb2.Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Client.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..efcbfa14a9ff --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS TestTable + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +CREATE TABLE TestTable +( + ID Int32, + Field1 Nullable(String), + Field2 Nullable(String), + CreatedOn Nullable(DateTime64(7)), + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ID, + t1.Field1, + t1.Field2, + t1.CreatedOn +FROM + TestTable t1 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE TestTable + diff --git a/ClickHouse.Client.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(ClickHouse.Client.LinqService).sql index 399cb1fca97a..300d0dfe04e6 100644 --- a/ClickHouse.Client.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(ClickHouse.Client.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS TempTable + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +CREATE TABLE IF NOT EXISTS TempTable +( + ID Int32 +) +ENGINE = Memory() + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +INSERT INTO TempTable +( + ID +) +SELECT + p.ParentID +FROM + Parent p + +BeforeExecute -- ClickHouse.Client ClickHouse SELECT @@ -7,3 +33,8 @@ FROM Parent p INNER JOIN TempTable t ON p.ParentID = t.ID +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS TempTable + diff --git a/ClickHouse.Client.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..a3913b141372 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(ClickHouse.Client.LinqService).sql @@ -0,0 +1,83 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS xxPerson + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +CREATE TABLE xxPerson +( + FirstName String, + PersonID Int32, + LastName String, + MiddleName Nullable(String), + Gender FixedString(1), + + PRIMARY KEY (PersonID) +) +ENGINE = MergeTree() +ORDER BY PersonID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +INSERT INTO xxPerson +( + FirstName, + PersonID, + LastName, + MiddleName, + Gender +) +VALUES +( + 'Steven', + 0, + 'King', + NULL, + 'M' +) + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson t1 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + xxPerson t1 +LIMIT 2 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + xxPerson +DELETE WHERE + PersonID = 0 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson t1 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE xxPerson + diff --git a/ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..f56679b1985e --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +INSERT INTO Child +( + ParentID, + ChildID +) +VALUES +( + 1, + 1001 +) + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ChildID = 1001 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + diff --git a/ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..c3050ac610e1 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,42 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +INSERT INTO Child +( + ParentID, + ChildID +) +SELECT + c_1.ParentID, + 1001 +FROM + Child c_1 +WHERE + c_1.ChildID = 11 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ChildID = 1001 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + diff --git a/ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..c3050ac610e1 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,42 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +INSERT INTO Child +( + ParentID, + ChildID +) +SELECT + c_1.ParentID, + 1001 +FROM + Child c_1 +WHERE + c_1.ChildID = 11 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ChildID = 1001 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + diff --git a/ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..5c319d4f8090 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(ClickHouse.Client.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +CREATE TABLE xxPerson +( + FirstName String, + PersonID Int32, + LastName String, + MiddleName Nullable(String), + Gender FixedString(1), + + PRIMARY KEY (PersonID) +) +ENGINE = MergeTree() +ORDER BY PersonID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +INSERT INTO xxPerson +( + FirstName, + PersonID, + LastName, + MiddleName, + Gender +) +VALUES +( + 'Steven', + 0, + 'King', + NULL, + 'M' +) + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE xxPerson + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS xxPerson + diff --git a/ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..4b344d8adcf3 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +INSERT INTO Parent +( + ParentID, + Value1 +) +VALUES +( + 1001, + 1001 +) + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = 1001 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + Parent +UPDATE + ParentID = ParentID + 1 +WHERE + ParentID = 1001 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = 1002 + diff --git a/ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..4b344d8adcf3 --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(ClickHouse.Client.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +INSERT INTO Parent +( + ParentID, + Value1 +) +VALUES +( + 1001, + 1001 +) + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = 1001 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + Parent +UPDATE + ParentID = ParentID + 1 +WHERE + ParentID = 1001 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = 1002 + diff --git a/ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(ClickHouse.Client.LinqService).sql new file mode 100644 index 000000000000..6f84758a60ce --- /dev/null +++ b/ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(ClickHouse.Client.LinqService).sql @@ -0,0 +1,93 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE IF EXISTS xxPerson + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +CREATE TABLE xxPerson +( + FirstName String, + PersonID Int32, + LastName String, + MiddleName Nullable(String), + Gender FixedString(1), + + PRIMARY KEY (PersonID) +) +ENGINE = MergeTree() +ORDER BY PersonID + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +INSERT INTO xxPerson +( + FirstName, + PersonID, + LastName, + MiddleName, + Gender +) +VALUES +( + 'Steven', + 0, + 'King', + NULL, + 'M' +) + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson t1 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + xxPerson t1 +LIMIT 2 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + xxPerson +UPDATE + FirstName = 'Steven', + LastName = 'King', + MiddleName = 'None', + Gender = 'M' +WHERE + PersonID = 0 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + xxPerson t1 +LIMIT 2 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +DROP TABLE xxPerson + diff --git a/ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(ClickHouse.Client.LinqService).sql b/ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(ClickHouse.Client.LinqService).sql index 3261565255b6..3b1c48325b1a 100644 --- a/ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(ClickHouse.Client.LinqService).sql +++ b/ClickHouse.Client.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(ClickHouse.Client.LinqService).sql @@ -18,3 +18,46 @@ VALUES 'Empty' ) +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.PersonID, + t1.Gender, + t1.FirstName, + t1.MiddleName, + t1.LastName +FROM + Person t1 +WHERE + t1.PersonID = 100 +LIMIT 1 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +ALTER TABLE + Person +UPDATE + Gender = 'M', + FirstName = 'UpdateComplex', + MiddleName = NULL, + LastName = 'UpdateComplex' +WHERE + PersonID = 100 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.PersonID, + t1.Gender, + t1.FirstName, + t1.MiddleName, + t1.LastName +FROM + Person t1 +WHERE + t1.PersonID = 100 +LIMIT 1 + diff --git a/ClickHouse.Client/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(ClickHouse.Client).sql b/ClickHouse.Client/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(ClickHouse.Client).sql new file mode 100644 index 000000000000..9db1265b05dd --- /dev/null +++ b/ClickHouse.Client/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(ClickHouse.Client).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/ClickHouse.Client/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(ClickHouse.Client).sql b/ClickHouse.Client/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(ClickHouse.Client).sql new file mode 100644 index 000000000000..66cf6578d327 --- /dev/null +++ b/ClickHouse.Client/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(ClickHouse.Client).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/ClickHouse.Client/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(ClickHouse.Client).sql b/ClickHouse.Client/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(ClickHouse.Client).sql new file mode 100644 index 000000000000..66cf6578d327 --- /dev/null +++ b/ClickHouse.Client/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(ClickHouse.Client).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- ClickHouse.Client ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + From e84ccf393758be236d7b64368834a2605730ca2d Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Thu, 20 Feb 2025 07:58:04 +0000 Subject: [PATCH 38/40] [Linux / ClickHouse MySql] baselines --- ...xt_Async(ClickHouse.MySql.LinqService).sql | 12 + ...ll4Async(ClickHouse.MySql.LinqService).sql | 13 ++ ...By2Async(ClickHouse.MySql.LinqService).sql | 36 +++ ...ble1Test(ClickHouse.MySql.LinqService).sql | 9 + ...ble2Test(ClickHouse.MySql.LinqService).sql | 11 + ...ast1Test(ClickHouse.MySql.LinqService).sql | 9 + ...ast2Test(ClickHouse.MySql.LinqService).sql | 11 + ...syncTest(ClickHouse.MySql.LinqService).sql | 15 ++ ...syncTest(ClickHouse.MySql.LinqService).sql | 15 ++ ...SkipTest(ClickHouse.MySql.LinqService).sql | 12 + ...rDefault(ClickHouse.MySql.LinqService).sql | 12 + ...syncTest(ClickHouse.MySql.LinqService).sql | 21 ++ ...syncTest(ClickHouse.MySql.LinqService).sql | 21 ++ ...estAsync(ClickHouse.MySql.LinqService).sql | 26 +++ ...stAsync2(ClickHouse.MySql.LinqService).sql | 26 +++ ...yncdTest(ClickHouse.MySql.LinqService).sql | 14 ++ ...st3Async(ClickHouse.MySql.LinqService).sql | 24 ++ ...estAsync(ClickHouse.MySql.LinqService).sql | 30 +++ ...estAsync(ClickHouse.MySql.LinqService).sql | 20 ++ ...stAsync2(ClickHouse.MySql.LinqService).sql | 20 ++ ...stAsync1(ClickHouse.MySql.LinqService).sql | 24 ++ ...stAsync2(ClickHouse.MySql.LinqService).sql | 24 ++ ...estAsync(ClickHouse.MySql.LinqService).sql | 20 ++ ...stAsync2(ClickHouse.MySql.LinqService).sql | 20 ++ ...AllAsync(ClickHouse.MySql.LinqService).sql | 151 +------------ ...AnyAsync(ClickHouse.MySql.LinqService).sql | 151 +------------ ...ateAsync(ClickHouse.MySql.LinqService).sql | 151 +------------ ...syncLong(ClickHouse.MySql.LinqService).sql | 148 +----------- ...insAsync(ClickHouse.MySql.LinqService).sql | 153 ++----------- ...untAsync(ClickHouse.MySql.LinqService).sql | 148 +----------- ...ateAsync(ClickHouse.MySql.LinqService).sql | 148 +----------- ...rstAsync(ClickHouse.MySql.LinqService).sql | 150 +----------- ...ultAsync(ClickHouse.MySql.LinqService).sql | 150 +----------- ...ateAsync(ClickHouse.MySql.LinqService).sql | 150 +----------- ...ateAsync(ClickHouse.MySql.LinqService).sql | 150 +----------- ...untAsync(ClickHouse.MySql.LinqService).sql | 148 +----------- ...ateAsync(ClickHouse.MySql.LinqService).sql | 148 +----------- ...MaxAsync(ClickHouse.MySql.LinqService).sql | 148 +----------- ...torAsync(ClickHouse.MySql.LinqService).sql | 148 +----------- ...MinAsync(ClickHouse.MySql.LinqService).sql | 148 +----------- ...torAsync(ClickHouse.MySql.LinqService).sql | 148 +----------- ...gleAsync(ClickHouse.MySql.LinqService).sql | 150 +----------- ...ultAsync(ClickHouse.MySql.LinqService).sql | 150 +----------- ...ateAsync(ClickHouse.MySql.LinqService).sql | 150 +----------- ...ateAsync(ClickHouse.MySql.LinqService).sql | 150 +----------- ...cDecimal(ClickHouse.MySql.LinqService).sql | 148 +----------- ...DecimalN(ClickHouse.MySql.LinqService).sql | 148 +----------- ...ncDouble(ClickHouse.MySql.LinqService).sql | 148 +----------- ...cDoubleN(ClickHouse.MySql.LinqService).sql | 148 +----------- ...yncFloat(ClickHouse.MySql.LinqService).sql | 148 +----------- ...ncFloatN(ClickHouse.MySql.LinqService).sql | 148 +----------- ...AsyncInt(ClickHouse.MySql.LinqService).sql | 148 +----------- ...syncIntN(ClickHouse.MySql.LinqService).sql | 148 +----------- ...syncLong(ClickHouse.MySql.LinqService).sql | 148 +----------- ...yncLongN(ClickHouse.MySql.LinqService).sql | 148 +----------- ...rDecimal(ClickHouse.MySql.LinqService).sql | 148 +----------- ...DecimalN(ClickHouse.MySql.LinqService).sql | 148 +----------- ...orDouble(ClickHouse.MySql.LinqService).sql | 148 +----------- ...rDoubleN(ClickHouse.MySql.LinqService).sql | 148 +----------- ...torFloat(ClickHouse.MySql.LinqService).sql | 148 +----------- ...orFloatN(ClickHouse.MySql.LinqService).sql | 148 +----------- ...ectorInt(ClickHouse.MySql.LinqService).sql | 148 +----------- ...ctorIntN(ClickHouse.MySql.LinqService).sql | 148 +----------- ...ctorLong(ClickHouse.MySql.LinqService).sql | 148 +----------- ...torLongN(ClickHouse.MySql.LinqService).sql | 148 +----------- ...at1Async(ClickHouse.MySql.LinqService).sql | 19 ++ ...entAsync(ClickHouse.MySql.LinqService).sql | 65 ++++++ ...redAsync(ClickHouse.MySql.LinqService).sql | 54 +++++ ...nt1Async(ClickHouse.MySql.LinqService).sql | 8 + ...nt2Async(ClickHouse.MySql.LinqService).sql | 10 + ...ssue4602(ClickHouse.MySql.LinqService).sql | 52 +---- ...57_Async(ClickHouse.MySql.LinqService).sql | 31 +++ ...nsaction(ClickHouse.MySql.LinqService).sql | 31 +++ ...st1Async(ClickHouse.MySql.LinqService).sql | 11 + ...t18Async(ClickHouse.MySql.LinqService).sql | 13 ++ ...er1Async(ClickHouse.MySql.LinqService).sql | 6 + ...3132Test(ClickHouse.MySql.LinqService).sql | 213 ++++++++++++++++++ ...nc(ClickHouse.MySql.LinqService,False).sql | 14 ++ ...ync(ClickHouse.MySql.LinqService,True).sql | 14 ++ ...nc(ClickHouse.MySql.LinqService,False).sql | 14 ++ ...ync(ClickHouse.MySql.LinqService,True).sql | 14 ++ ...ip1Async(ClickHouse.MySql.LinqService).sql | 74 +----- ...nc(ClickHouse.MySql.LinqService,False).sql | 20 ++ ...ync(ClickHouse.MySql.LinqService,True).sql | 20 ++ ...nc(ClickHouse.MySql.LinqService,False).sql | 10 + ...ync(ClickHouse.MySql.LinqService,True).sql | 10 + ...nc(ClickHouse.MySql.LinqService,False).sql | 12 + ...ync(ClickHouse.MySql.LinqService,True).sql | 12 + ...nc(ClickHouse.MySql.LinqService,False).sql | 12 + ...ync(ClickHouse.MySql.LinqService,True).sql | 12 + ...nc(ClickHouse.MySql.LinqService,False).sql | 10 + ...ync(ClickHouse.MySql.LinqService,True).sql | 10 + ...e.MySql.LinqService,False,False,False).sql | 18 ++ ...se.MySql.LinqService,False,False,True).sql | 18 ++ ...se.MySql.LinqService,False,True,False).sql | 18 ++ ...use.MySql.LinqService,False,True,True).sql | 18 ++ ...se.MySql.LinqService,True,False,False).sql | 18 ++ ...use.MySql.LinqService,True,False,True).sql | 18 ++ ...use.MySql.LinqService,True,True,False).sql | 18 ++ ...ouse.MySql.LinqService,True,True,True).sql | 18 ++ ...le1Async(ClickHouse.MySql.LinqService).sql | 36 +++ ...bleAsync(ClickHouse.MySql.LinqService).sql | 31 +++ ...ameAsync(ClickHouse.MySql.LinqService).sql | 83 +++++++ ...rt2Async(ClickHouse.MySql.LinqService).sql | 40 ++++ ...rt3Async(ClickHouse.MySql.LinqService).sql | 42 ++++ ...rt4Async(ClickHouse.MySql.LinqService).sql | 42 ++++ ...ameAsync(ClickHouse.MySql.LinqService).sql | 46 ++++ ...te1Async(ClickHouse.MySql.LinqService).sql | 44 ++++ ...te2Async(ClickHouse.MySql.LinqService).sql | 44 ++++ ...ameAsync(ClickHouse.MySql.LinqService).sql | 93 ++++++++ ...ex1Async(ClickHouse.MySql.LinqService).sql | 43 ++++ ...Linq.AsyncTests.Test(ClickHouse.MySql).sql | 18 ++ ...inq.AsyncTests.Test1(ClickHouse.MySql).sql | 9 + ...yncTests.TestForEach(ClickHouse.MySql).sql | 9 + 114 files changed, 2190 insertions(+), 5848 deletions(-) create mode 100644 ClickHouse.MySql.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.MySql.LinqService,False).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.MySql.LinqService,True).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.MySql.LinqService,False).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.MySql.LinqService,True).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.MySql.LinqService,False).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.MySql.LinqService,True).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.MySql.LinqService,False).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.MySql.LinqService,True).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.MySql.LinqService,False).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.MySql.LinqService,True).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.MySql.LinqService,False).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.MySql.LinqService,True).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(ClickHouse.MySql.LinqService).sql create mode 100644 ClickHouse.MySql/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(ClickHouse.MySql).sql create mode 100644 ClickHouse.MySql/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(ClickHouse.MySql).sql create mode 100644 ClickHouse.MySql/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(ClickHouse.MySql).sql diff --git a/ClickHouse.MySql.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..8433273b5d33 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + Person t1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..1aecd31c2283 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID <= 3 + ) + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..0b76504ddeb1 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + m_1.ParentID, + t2.ParentID_1, + t2.ChildID +FROM + ( + SELECT DISTINCT + a_Parent1.ParentID as ParentID + FROM + Child t1 + INNER JOIN Parent a_Parent1 ON t1.ParentID = a_Parent1.ParentID + ) m_1 + INNER JOIN ( + SELECT + a_Parent1_1.ParentID as ParentID, + d.ParentID as ParentID_1, + d.ChildID as ChildID + FROM + Child d + INNER JOIN Parent a_Parent1_1 ON d.ParentID = a_Parent1_1.ParentID + ) t2 ON m_1.ParentID = t2.ParentID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + a_Parent1.ParentID +FROM + Child t1 + INNER JOIN Parent a_Parent1 ON t1.ParentID = a_Parent1.ParentID +GROUP BY + a_Parent1.ParentID + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..5235df1e503b --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..9be3b51741bb --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID > 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..5235df1e503b --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..9be3b51741bb --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID > 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..7775147d228d --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + CASE + WHEN 1 IN ( + SELECT + t1.PersonID + FROM + Person t1 + ) + THEN true + ELSE false + END + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..dee9158c46fd --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + p.FirstName, + p.PersonID, + p.LastName, + p.MiddleName, + p.Gender +FROM + Person p +WHERE + p.PersonID = 1 +LIMIT 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(ClickHouse.MySql.LinqService).sql index 7c6197120493..60cd7a4269d6 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(ClickHouse.MySql.LinqService).sql @@ -10,3 +10,15 @@ ORDER BY t1.ParentID LIMIT 1, 2 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 +ORDER BY + t1.ParentID +LIMIT 1, 2 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..9dca94516d34 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + o.ParentID, + o.Value1 +FROM + Parent o +WHERE + o.ParentID IN (1, 2, 3) OR o.ParentID = 4 +LIMIT 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..9394f5c79602 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +ORDER BY + t1.ParentID, + t1.ChildID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..9394f5c79602 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +ORDER BY + t1.ParentID, + t1.ChildID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..4d08fcb8e4a3 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = 1 + ) + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = -1 + ) + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..4d08fcb8e4a3 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = 1 + ) + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = -1 + ) + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..9647e358dc85 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID = 1 +ORDER BY + x.ParentID DESC +LIMIT 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..0bf43a798ae9 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 1 +LIMIT 1 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 2 +LIMIT 2 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..99ef5ca446c3 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + CASE + WHEN 1 IN ( + SELECT + c_1.ParentID + FROM + Child c_1 + ) + THEN true + ELSE false + END + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + CASE + WHEN -1 IN ( + SELECT + c_1.ParentID + FROM + Child c_1 + ) + THEN true + ELSE false + END + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..2e3397b21422 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = 1 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = -1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..2e3397b21422 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = 1 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = -1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..3b202c7f723d --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 1 +LIMIT 1 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 2 +LIMIT 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..3b202c7f723d --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 1 +LIMIT 1 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 2 +LIMIT 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..02b074346d68 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = 1 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = -1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..02b074346d68 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = 1 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = -1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..0d7b9d018efd 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,13 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + AsyncDataTable c_1 + WHERE + c_1.Id <> 2 + ) diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..cb2714515099 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,13 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + AsyncDataTable c_1 + WHERE + c_1.Id = 2 + ) diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..cb2714515099 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,13 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + AsyncDataTable c_1 + WHERE + c_1.Id = 2 + ) diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(ClickHouse.MySql.LinqService).sql index 9bd197974887..119ca2938c1d 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + avgOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..853687b687f5 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,15 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + CASE + WHEN 2 IN ( + SELECT + c_1.Id + FROM + AsyncDataTable c_1 + ) + THEN true + ELSE false + END diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..8c2747d49fa0 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..8c2747d49fa0 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..ac805e5b1f9e 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 1 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..ac805e5b1f9e 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 1 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..ac805e5b1f9e 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 1 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..ac805e5b1f9e 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 1 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..8c2747d49fa0 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..8c2747d49fa0 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..9d5c97c250c8 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > 2 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..9d5c97c250c8 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > 2 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..be472d961c8c 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + minOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > 2 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..be472d961c8c 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + minOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > 2 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..d7bc2d341995 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 2 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..d7bc2d341995 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 2 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..d7bc2d341995 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 2 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(ClickHouse.MySql.LinqService).sql index 9bd197974887..d7bc2d341995 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 2 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(ClickHouse.MySql.LinqService).sql index 9bd197974887..139df61732d5 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toDecimal128(c_1.Id, 10)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(ClickHouse.MySql.LinqService).sql index 9bd197974887..139df61732d5 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toDecimal128(c_1.Id, 10)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(ClickHouse.MySql.LinqService).sql index 9bd197974887..f0c91298b0cc 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(ClickHouse.MySql.LinqService).sql index 9bd197974887..f0c91298b0cc 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(ClickHouse.MySql.LinqService).sql index 9bd197974887..55b5d18a0ef6 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat32(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(ClickHouse.MySql.LinqService).sql index 9bd197974887..55b5d18a0ef6 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat32(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(ClickHouse.MySql.LinqService).sql index 9bd197974887..3a5c9f7c770e 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(ClickHouse.MySql.LinqService).sql index 9bd197974887..3a5c9f7c770e 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(ClickHouse.MySql.LinqService).sql index 9bd197974887..9ffc9fb7e20e 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(ClickHouse.MySql.LinqService).sql index 9bd197974887..9ffc9fb7e20e 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(ClickHouse.MySql.LinqService).sql index 9bd197974887..139df61732d5 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toDecimal128(c_1.Id, 10)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(ClickHouse.MySql.LinqService).sql index 9bd197974887..139df61732d5 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toDecimal128(c_1.Id, 10)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(ClickHouse.MySql.LinqService).sql index 9bd197974887..f0c91298b0cc 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(ClickHouse.MySql.LinqService).sql index 9bd197974887..f0c91298b0cc 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(ClickHouse.MySql.LinqService).sql index 9bd197974887..55b5d18a0ef6 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat32(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(ClickHouse.MySql.LinqService).sql index 9bd197974887..55b5d18a0ef6 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat32(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(ClickHouse.MySql.LinqService).sql index 9bd197974887..3a5c9f7c770e 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(ClickHouse.MySql.LinqService).sql index 9bd197974887..3a5c9f7c770e 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(ClickHouse.MySql.LinqService).sql index 9bd197974887..9ffc9fb7e20e 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(ClickHouse.MySql.LinqService).sql index 9bd197974887..9ffc9fb7e20e 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(ClickHouse.MySql.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + sumOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..984564f19fa5 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID = 1 +UNION ALL +SELECT + p_1.ParentID as ParentID, + p_1.Value1 as Value1 +FROM + Parent p_1 +WHERE + p_1.ParentID = 2 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(ClickHouse.MySql.LinqService).sql index 373830727e85..854f77635574 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(ClickHouse.MySql.LinqService).sql @@ -1,4 +1,20 @@ BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +INSERT INTO ConcurrencyAutoIncrement +( + Id, + Stamp, + Value +) +VALUES +( + 1, + -10, + 'initial' +) + +BeforeExecute -- ClickHouse.MySql ClickHouse SELECT @@ -8,6 +24,17 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +UPDATE + Stamp = Stamp + 1, + Value = 'value 1' +WHERE + Id = 1 AND Stamp = -10 + BeforeExecute -- ClickHouse.MySql ClickHouse @@ -18,6 +45,17 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +UPDATE + Stamp = Stamp + 1, + Value = 'value 2' +WHERE + Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.MySql ClickHouse @@ -28,6 +66,17 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +UPDATE + Stamp = Stamp + 1, + Value = 'value 3' +WHERE + Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.MySql ClickHouse @@ -38,6 +87,14 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +DELETE WHERE + Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.MySql ClickHouse @@ -48,6 +105,14 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +DELETE WHERE + Id = 1 AND Stamp = -8 + BeforeExecute -- ClickHouse.MySql ClickHouse diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(ClickHouse.MySql.LinqService).sql index 861ec2b8bf43..e3fb27092cc1 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(ClickHouse.MySql.LinqService).sql @@ -1,4 +1,20 @@ BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +INSERT INTO ConcurrencyFiltered +( + Id, + Stamp, + Value +) +VALUES +( + 1, + -10, + 'initial' +) + +BeforeExecute -- ClickHouse.MySql ClickHouse SELECT @@ -8,6 +24,17 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyFiltered +UPDATE + Stamp = Stamp + 1, + Value = 'value 1' +WHERE + Id = 2 AND Id = 1 AND Stamp = -10 + BeforeExecute -- ClickHouse.MySql ClickHouse @@ -18,6 +45,17 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyFiltered +UPDATE + Stamp = Stamp + 1, + Value = 'value 2' +WHERE + Id = 1 AND Id = 1 AND Stamp = -10 + BeforeExecute -- ClickHouse.MySql ClickHouse @@ -28,6 +66,14 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyFiltered +DELETE WHERE + Id = 2 AND Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.MySql ClickHouse @@ -38,6 +84,14 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyFiltered +DELETE WHERE + Id = 1 AND Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.MySql ClickHouse diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..7744ae1ae87d --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent t1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..3901fdca50a4 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID > 2 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(ClickHouse.MySql.LinqService).sql index c25f1fdb172c..36cb3c92d887 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(ClickHouse.MySql.LinqService).sql @@ -1,45 +1,11 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS DynamicParent - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS DynamicParent -( - ID Int32, - - PRIMARY KEY (ID) -) -ENGINE = MergeTree() -ORDER BY ID - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS DynamicChild - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS DynamicChild -( - ID Int32, - ParentID Int32, - - PRIMARY KEY (ID) -) -ENGINE = MergeTree() -ORDER BY ID - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS DynamicChild - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS DynamicParent +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + it.ID +FROM + DynamicParent it + LEFT JOIN DynamicChild a_Child ON it.ID = a_Child.ParentID +WHERE + a_Child.ID = 123 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(ClickHouse.MySql.LinqService).sql index 95ad96e7ee9c..3bf51344c5e7 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(ClickHouse.MySql.LinqService).sql @@ -60,3 +60,34 @@ WHERE x.ParentID = 3 LIMIT 1 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + m_1.ParentID, + d.ParentID, + d.ChildID +FROM + ( + SELECT + x.ParentID as ParentID + FROM + Parent x + WHERE + x.ParentID = 3 + LIMIT 1 + ) m_1 + INNER JOIN Child d ON m_1.ParentID = d.ParentID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID = 3 +LIMIT 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(ClickHouse.MySql.LinqService).sql index 95ad96e7ee9c..3bf51344c5e7 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(ClickHouse.MySql.LinqService).sql @@ -60,3 +60,34 @@ WHERE x.ParentID = 3 LIMIT 1 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + m_1.ParentID, + d.ParentID, + d.ChildID +FROM + ( + SELECT + x.ParentID as ParentID + FROM + Parent x + WHERE + x.ParentID = 3 + LIMIT 1 + ) m_1 + INNER JOIN Child d ON m_1.ParentID = d.ParentID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID = 3 +LIMIT 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..6034d5167e7e --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 +WHERE + t1.Value1 = 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..7955e77668fa --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT DISTINCT + p1.PersonID, + p1.Gender, + p1.FirstName, + p1.LastName +FROM + Person p1 +WHERE + p1.PersonID IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND p1.Gender = 'F' + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..22c99bb9eb8e --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..9f2b5ed69987 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + x.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x +WHERE + x.MiddleName IS NOT NULL +GROUP BY + x.MiddleName +UNION ALL +SELECT + x_1.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_1 +WHERE + x_1.MiddleName IS NOT NULL +GROUP BY + x_1.MiddleName +UNION ALL +SELECT + x_2.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_2 +WHERE + x_2.MiddleName IS NOT NULL +GROUP BY + x_2.MiddleName +UNION ALL +SELECT + x_3.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_3 +WHERE + x_3.MiddleName IS NOT NULL +GROUP BY + x_3.MiddleName +UNION ALL +SELECT + x_4.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_4 +WHERE + x_4.MiddleName IS NOT NULL +GROUP BY + x_4.MiddleName +UNION ALL +SELECT + x_5.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_5 +WHERE + x_5.MiddleName IS NOT NULL +GROUP BY + x_5.MiddleName +UNION ALL +SELECT + x_6.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_6 +WHERE + x_6.MiddleName IS NOT NULL +GROUP BY + x_6.MiddleName +UNION ALL +SELECT + x_7.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_7 +WHERE + x_7.MiddleName IS NOT NULL +GROUP BY + x_7.MiddleName +UNION ALL +SELECT + x_8.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_8 +WHERE + x_8.MiddleName IS NOT NULL +GROUP BY + x_8.MiddleName +UNION ALL +SELECT + x_9.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_9 +WHERE + x_9.MiddleName IS NOT NULL +GROUP BY + x_9.MiddleName +UNION ALL +SELECT + x_10.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_10 +WHERE + x_10.MiddleName IS NOT NULL +GROUP BY + x_10.MiddleName +UNION ALL +SELECT + x_11.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_11 +WHERE + x_11.MiddleName IS NOT NULL +GROUP BY + x_11.MiddleName +UNION ALL +SELECT + x_12.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_12 +WHERE + x_12.MiddleName IS NOT NULL +GROUP BY + x_12.MiddleName +UNION ALL +SELECT + x_13.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_13 +WHERE + x_13.MiddleName IS NOT NULL +GROUP BY + x_13.MiddleName +UNION ALL +SELECT + x_14.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_14 +WHERE + x_14.MiddleName IS NOT NULL +GROUP BY + x_14.MiddleName +UNION ALL +SELECT + x_15.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_15 +WHERE + x_15.MiddleName IS NOT NULL +GROUP BY + x_15.MiddleName +UNION ALL +SELECT + x_16.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_16 +WHERE + x_16.MiddleName IS NOT NULL +GROUP BY + x_16.MiddleName +UNION ALL +SELECT + x_17.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_17 +WHERE + x_17.MiddleName IS NOT NULL +GROUP BY + x_17.MiddleName +UNION ALL +SELECT + x_18.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_18 +WHERE + x_18.MiddleName IS NOT NULL +GROUP BY + x_18.MiddleName +UNION ALL +SELECT + x_19.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_19 +WHERE + x_19.MiddleName IS NOT NULL +GROUP BY + x_19.MiddleName +UNION ALL +SELECT + x_20.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_20 +WHERE + x_20.MiddleName IS NOT NULL +GROUP BY + x_20.MiddleName + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.MySql.LinqService,False).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.MySql.LinqService,False).sql new file mode 100644 index 000000000000..805f30ab80b3 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.MySql.LinqService,False).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID +LIMIT 3, 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.MySql.LinqService,True).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.MySql.LinqService,True).sql new file mode 100644 index 000000000000..805f30ab80b3 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.MySql.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID +LIMIT 3, 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.MySql.LinqService,False).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.MySql.LinqService,False).sql new file mode 100644 index 000000000000..805f30ab80b3 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.MySql.LinqService,False).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID +LIMIT 3, 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.MySql.LinqService,True).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.MySql.LinqService,True).sql new file mode 100644 index 000000000000..805f30ab80b3 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.MySql.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID +LIMIT 3, 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(ClickHouse.MySql.LinqService).sql index e727750979b6..924a2336e823 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(ClickHouse.MySql.LinqService).sql @@ -1,67 +1,11 @@ BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS TakeSkipClass - -BeforeExecute --- ClickHouse.MySql ClickHouse - -CREATE TABLE IF NOT EXISTS TakeSkipClass -( - Value Nullable(String) -) -ENGINE = Memory() - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO TakeSkipClass -( - Value -) -VALUES -( - 'PLUTO' -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO TakeSkipClass -( - Value -) -VALUES -( - 'PIPPO' -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO TakeSkipClass -( - Value -) -VALUES -( - 'PLUTO' -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -INSERT INTO TakeSkipClass -( - Value -) -VALUES -( - 'BOLTO' -) - -BeforeExecute --- ClickHouse.MySql ClickHouse - -DROP TABLE IF EXISTS TakeSkipClass +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.Value +FROM + TakeSkipClass t1 +ORDER BY + t1.Value +LIMIT 3, 18446744073709551615 diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.MySql.LinqService,False).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.MySql.LinqService,False).sql index 7b1f3b39b71b..20a4106f1441 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.MySql.LinqService,False).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.MySql.LinqService,False).sql @@ -18,3 +18,23 @@ FROM Child ch LIMIT 3 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +LIMIT 2 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +LIMIT 3 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.MySql.LinqService,True).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.MySql.LinqService,True).sql index 7b1f3b39b71b..20a4106f1441 100644 --- a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.MySql.LinqService,True).sql +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.MySql.LinqService,True).sql @@ -18,3 +18,23 @@ FROM Child ch LIMIT 3 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +LIMIT 2 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +LIMIT 3 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.MySql.LinqService,False).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.MySql.LinqService,False).sql new file mode 100644 index 000000000000..764d685d9add --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.MySql.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +LIMIT 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.MySql.LinqService,True).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.MySql.LinqService,True).sql new file mode 100644 index 000000000000..764d685d9add --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.MySql.LinqService,True).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +LIMIT 1 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.MySql.LinqService,False).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.MySql.LinqService,False).sql new file mode 100644 index 000000000000..ed3668da5b19 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.MySql.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID > 3 OR ch.ChildID < 4 +LIMIT 3 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.MySql.LinqService,True).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.MySql.LinqService,True).sql new file mode 100644 index 000000000000..ed3668da5b19 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.MySql.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID > 3 OR ch.ChildID < 4 +LIMIT 3 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.MySql.LinqService,False).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.MySql.LinqService,False).sql new file mode 100644 index 000000000000..0a48e860f1c3 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.MySql.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID >= 0 AND ch.ChildID <= 100 +LIMIT 3 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.MySql.LinqService,True).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.MySql.LinqService,True).sql new file mode 100644 index 000000000000..0a48e860f1c3 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.MySql.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID >= 0 AND ch.ChildID <= 100 +LIMIT 3 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.MySql.LinqService,False).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.MySql.LinqService,False).sql new file mode 100644 index 000000000000..fc861cb0a867 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.MySql.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +LIMIT 3 + diff --git a/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.MySql.LinqService,True).sql b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.MySql.LinqService,True).sql new file mode 100644 index 000000000000..fc861cb0a867 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.MySql.LinqService,True).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +LIMIT 3 + diff --git a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,False,False).sql b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,False,False).sql index d348e0925ed6..fed017f3cfa0 100644 --- a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,False,False).sql +++ b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,False,False).sql @@ -3,3 +3,21 @@ DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +CREATE TABLE Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,False,True).sql b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,False,True).sql index d348e0925ed6..fed017f3cfa0 100644 --- a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,False,True).sql +++ b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,False,True).sql @@ -3,3 +3,21 @@ DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +CREATE TABLE Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,True,False).sql b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,True,False).sql index 00c80f940f97..16737e94652b 100644 --- a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,True,False).sql +++ b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,True,False).sql @@ -12,3 +12,21 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +CREATE TABLE testdb3.Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,True,True).sql b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,True,True).sql index 00c80f940f97..16737e94652b 100644 --- a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,True,True).sql +++ b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,False,True,True).sql @@ -12,3 +12,21 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +CREATE TABLE testdb3.Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,False,False).sql b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,False,False).sql index d348e0925ed6..fed017f3cfa0 100644 --- a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,False,False).sql +++ b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,False,False).sql @@ -3,3 +3,21 @@ DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +CREATE TABLE Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,False,True).sql b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,False,True).sql index d348e0925ed6..fed017f3cfa0 100644 --- a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,False,True).sql +++ b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,False,True).sql @@ -3,3 +3,21 @@ DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +CREATE TABLE Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,True,False).sql b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,True,False).sql index 00c80f940f97..16737e94652b 100644 --- a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,True,False).sql +++ b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,True,False).sql @@ -12,3 +12,21 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +CREATE TABLE testdb3.Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,True,True).sql b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,True,True).sql index 00c80f940f97..16737e94652b 100644 --- a/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,True,True).sql +++ b/ClickHouse.MySql.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.MySql.LinqService,True,True,True).sql @@ -12,3 +12,21 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +CREATE TABLE testdb3.Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.MySql.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..3d9daa1a6d4d --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS TestTable + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +CREATE TABLE TestTable +( + ID Int32, + Field1 Nullable(String), + Field2 Nullable(String), + CreatedOn Nullable(DateTime64(7)), + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ID, + t1.Field1, + t1.Field2, + t1.CreatedOn +FROM + TestTable t1 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE TestTable + diff --git a/ClickHouse.MySql.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(ClickHouse.MySql.LinqService).sql index 70ef89862125..d851854eaab3 100644 --- a/ClickHouse.MySql.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(ClickHouse.MySql.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS TempTable + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +CREATE TABLE IF NOT EXISTS TempTable +( + ID Int32 +) +ENGINE = Memory() + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +INSERT INTO TempTable +( + ID +) +SELECT + p.ParentID +FROM + Parent p + +BeforeExecute -- ClickHouse.MySql ClickHouse SELECT @@ -7,3 +33,8 @@ FROM Parent p INNER JOIN TempTable t ON p.ParentID = t.ID +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS TempTable + diff --git a/ClickHouse.MySql.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..64528fe9d822 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,83 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS xxPerson + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +CREATE TABLE xxPerson +( + FirstName String, + PersonID Int32, + LastName String, + MiddleName Nullable(String), + Gender FixedString(1), + + PRIMARY KEY (PersonID) +) +ENGINE = MergeTree() +ORDER BY PersonID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +INSERT INTO xxPerson +( + FirstName, + PersonID, + LastName, + MiddleName, + Gender +) +VALUES +( + 'Steven', + 0, + 'King', + NULL, + 'M' +) + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson t1 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + xxPerson t1 +LIMIT 2 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + xxPerson +DELETE WHERE + PersonID = 0 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson t1 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE xxPerson + diff --git a/ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..7622a98f5822 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +INSERT INTO Child +( + ParentID, + ChildID +) +VALUES +( + 1, + 1001 +) + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ChildID = 1001 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + diff --git a/ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..6ccdc90c3f1b --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,42 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +INSERT INTO Child +( + ParentID, + ChildID +) +SELECT + c_1.ParentID, + 1001 +FROM + Child c_1 +WHERE + c_1.ChildID = 11 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ChildID = 1001 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + diff --git a/ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..6ccdc90c3f1b --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,42 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +INSERT INTO Child +( + ParentID, + ChildID +) +SELECT + c_1.ParentID, + 1001 +FROM + Child c_1 +WHERE + c_1.ChildID = 11 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ChildID = 1001 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + diff --git a/ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..e8713825ee2c --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +CREATE TABLE xxPerson +( + FirstName String, + PersonID Int32, + LastName String, + MiddleName Nullable(String), + Gender FixedString(1), + + PRIMARY KEY (PersonID) +) +ENGINE = MergeTree() +ORDER BY PersonID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +INSERT INTO xxPerson +( + FirstName, + PersonID, + LastName, + MiddleName, + Gender +) +VALUES +( + 'Steven', + 0, + 'King', + NULL, + 'M' +) + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE xxPerson + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS xxPerson + diff --git a/ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..e13d201d90a2 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +INSERT INTO Parent +( + ParentID, + Value1 +) +VALUES +( + 1001, + 1001 +) + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = 1001 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + Parent +UPDATE + ParentID = ParentID + 1 +WHERE + ParentID = 1001 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = 1002 + diff --git a/ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..e13d201d90a2 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +INSERT INTO Parent +( + ParentID, + Value1 +) +VALUES +( + 1001, + 1001 +) + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = 1001 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + Parent +UPDATE + ParentID = ParentID + 1 +WHERE + ParentID = 1001 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = 1002 + diff --git a/ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(ClickHouse.MySql.LinqService).sql new file mode 100644 index 000000000000..7a3c33d9d035 --- /dev/null +++ b/ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(ClickHouse.MySql.LinqService).sql @@ -0,0 +1,93 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE IF EXISTS xxPerson + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +CREATE TABLE xxPerson +( + FirstName String, + PersonID Int32, + LastName String, + MiddleName Nullable(String), + Gender FixedString(1), + + PRIMARY KEY (PersonID) +) +ENGINE = MergeTree() +ORDER BY PersonID + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +INSERT INTO xxPerson +( + FirstName, + PersonID, + LastName, + MiddleName, + Gender +) +VALUES +( + 'Steven', + 0, + 'King', + NULL, + 'M' +) + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson t1 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + xxPerson t1 +LIMIT 2 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + xxPerson +UPDATE + FirstName = 'Steven', + LastName = 'King', + MiddleName = 'None', + Gender = 'M' +WHERE + PersonID = 0 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + xxPerson t1 +LIMIT 2 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +DROP TABLE xxPerson + diff --git a/ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(ClickHouse.MySql.LinqService).sql b/ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(ClickHouse.MySql.LinqService).sql index bc1b57671cbe..226d36999dd1 100644 --- a/ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(ClickHouse.MySql.LinqService).sql +++ b/ClickHouse.MySql.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(ClickHouse.MySql.LinqService).sql @@ -18,3 +18,46 @@ VALUES 'Empty' ) +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.PersonID, + t1.Gender, + t1.FirstName, + t1.MiddleName, + t1.LastName +FROM + Person t1 +WHERE + t1.PersonID = 100 +LIMIT 1 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +ALTER TABLE + Person +UPDATE + Gender = 'M', + FirstName = 'UpdateComplex', + MiddleName = NULL, + LastName = 'UpdateComplex' +WHERE + PersonID = 100 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.PersonID, + t1.Gender, + t1.FirstName, + t1.MiddleName, + t1.LastName +FROM + Person t1 +WHERE + t1.PersonID = 100 +LIMIT 1 + diff --git a/ClickHouse.MySql/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(ClickHouse.MySql).sql b/ClickHouse.MySql/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(ClickHouse.MySql).sql new file mode 100644 index 000000000000..8e934d7ee2eb --- /dev/null +++ b/ClickHouse.MySql/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(ClickHouse.MySql).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/ClickHouse.MySql/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(ClickHouse.MySql).sql b/ClickHouse.MySql/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(ClickHouse.MySql).sql new file mode 100644 index 000000000000..5235df1e503b --- /dev/null +++ b/ClickHouse.MySql/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(ClickHouse.MySql).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/ClickHouse.MySql/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(ClickHouse.MySql).sql b/ClickHouse.MySql/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(ClickHouse.MySql).sql new file mode 100644 index 000000000000..5235df1e503b --- /dev/null +++ b/ClickHouse.MySql/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(ClickHouse.MySql).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- ClickHouse.MySql ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + From 7c2c5c2988cd981550468ff9d6b0f412da6a6df1 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Thu, 20 Feb 2025 08:20:28 +0000 Subject: [PATCH 39/40] [Linux / ClickHouse Octonica] baselines --- ...Async(ClickHouse.Octonica.LinqService).sql | 12 + ...Async(ClickHouse.Octonica.LinqService).sql | 13 ++ ...Async(ClickHouse.Octonica.LinqService).sql | 36 +++ ...1Test(ClickHouse.Octonica.LinqService).sql | 9 + ...2Test(ClickHouse.Octonica.LinqService).sql | 11 + ...1Test(ClickHouse.Octonica.LinqService).sql | 9 + ...2Test(ClickHouse.Octonica.LinqService).sql | 11 + ...cTest(ClickHouse.Octonica.LinqService).sql | 15 ++ ...cTest(ClickHouse.Octonica.LinqService).sql | 15 ++ ...pTest(ClickHouse.Octonica.LinqService).sql | 12 + ...fault(ClickHouse.Octonica.LinqService).sql | 12 + ...cTest(ClickHouse.Octonica.LinqService).sql | 21 ++ ...cTest(ClickHouse.Octonica.LinqService).sql | 21 ++ ...Async(ClickHouse.Octonica.LinqService).sql | 26 +++ ...sync2(ClickHouse.Octonica.LinqService).sql | 26 +++ ...dTest(ClickHouse.Octonica.LinqService).sql | 14 ++ ...Async(ClickHouse.Octonica.LinqService).sql | 24 ++ ...Async(ClickHouse.Octonica.LinqService).sql | 30 +++ ...Async(ClickHouse.Octonica.LinqService).sql | 20 ++ ...sync2(ClickHouse.Octonica.LinqService).sql | 20 ++ ...sync1(ClickHouse.Octonica.LinqService).sql | 24 ++ ...sync2(ClickHouse.Octonica.LinqService).sql | 24 ++ ...Async(ClickHouse.Octonica.LinqService).sql | 20 ++ ...sync2(ClickHouse.Octonica.LinqService).sql | 20 ++ ...Async(ClickHouse.Octonica.LinqService).sql | 151 +------------ ...Async(ClickHouse.Octonica.LinqService).sql | 151 +------------ ...Async(ClickHouse.Octonica.LinqService).sql | 151 +------------ ...cLong(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 153 ++----------- ...Async(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 150 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 150 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 150 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 150 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 150 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 150 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 150 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 150 +----------- ...cimal(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...imalN(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...ouble(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...ubleN(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...Float(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...loatN(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...ncInt(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...cIntN(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...cLong(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...LongN(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...cimal(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...imalN(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...ouble(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...ubleN(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...Float(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...loatN(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...orInt(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...rIntN(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...rLong(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...LongN(ClickHouse.Octonica.LinqService).sql | 148 +----------- ...Async(ClickHouse.Octonica.LinqService).sql | 19 ++ ...Async(ClickHouse.Octonica.LinqService).sql | 65 ++++++ ...Async(ClickHouse.Octonica.LinqService).sql | 54 +++++ ...Async(ClickHouse.Octonica.LinqService).sql | 8 + ...Async(ClickHouse.Octonica.LinqService).sql | 10 + ...e4602(ClickHouse.Octonica.LinqService).sql | 52 +---- ...Async(ClickHouse.Octonica.LinqService).sql | 31 +++ ...ction(ClickHouse.Octonica.LinqService).sql | 31 +++ ...Async(ClickHouse.Octonica.LinqService).sql | 11 + ...Async(ClickHouse.Octonica.LinqService).sql | 13 ++ ...Async(ClickHouse.Octonica.LinqService).sql | 6 + ...2Test(ClickHouse.Octonica.LinqService).sql | 213 ++++++++++++++++++ ...ClickHouse.Octonica.LinqService,False).sql | 14 ++ ...(ClickHouse.Octonica.LinqService,True).sql | 14 ++ ...ClickHouse.Octonica.LinqService,False).sql | 14 ++ ...(ClickHouse.Octonica.LinqService,True).sql | 14 ++ ...Async(ClickHouse.Octonica.LinqService).sql | 74 +----- ...ClickHouse.Octonica.LinqService,False).sql | 20 ++ ...(ClickHouse.Octonica.LinqService,True).sql | 20 ++ ...ClickHouse.Octonica.LinqService,False).sql | 10 + ...(ClickHouse.Octonica.LinqService,True).sql | 10 + ...ClickHouse.Octonica.LinqService,False).sql | 12 + ...(ClickHouse.Octonica.LinqService,True).sql | 12 + ...ClickHouse.Octonica.LinqService,False).sql | 12 + ...(ClickHouse.Octonica.LinqService,True).sql | 12 + ...ClickHouse.Octonica.LinqService,False).sql | 10 + ...(ClickHouse.Octonica.LinqService,True).sql | 10 + ...ctonica.LinqService,False,False,False).sql | 18 ++ ...Octonica.LinqService,False,False,True).sql | 18 ++ ...Octonica.LinqService,False,True,False).sql | 18 ++ ....Octonica.LinqService,False,True,True).sql | 18 ++ ...Octonica.LinqService,True,False,False).sql | 18 ++ ....Octonica.LinqService,True,False,True).sql | 18 ++ ....Octonica.LinqService,True,True,False).sql | 18 ++ ...e.Octonica.LinqService,True,True,True).sql | 18 ++ ...Async(ClickHouse.Octonica.LinqService).sql | 36 +++ ...Async(ClickHouse.Octonica.LinqService).sql | 31 +++ ...Async(ClickHouse.Octonica.LinqService).sql | 83 +++++++ ...Async(ClickHouse.Octonica.LinqService).sql | 40 ++++ ...Async(ClickHouse.Octonica.LinqService).sql | 42 ++++ ...Async(ClickHouse.Octonica.LinqService).sql | 42 ++++ ...Async(ClickHouse.Octonica.LinqService).sql | 46 ++++ ...Async(ClickHouse.Octonica.LinqService).sql | 44 ++++ ...Async(ClickHouse.Octonica.LinqService).sql | 44 ++++ ...Async(ClickHouse.Octonica.LinqService).sql | 93 ++++++++ ...Async(ClickHouse.Octonica.LinqService).sql | 43 ++++ ...q.AsyncTests.Test(ClickHouse.Octonica).sql | 18 ++ ....AsyncTests.Test1(ClickHouse.Octonica).sql | 9 + ...Tests.TestForEach(ClickHouse.Octonica).sql | 9 + 114 files changed, 2190 insertions(+), 5848 deletions(-) create mode 100644 ClickHouse.Octonica.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Octonica.LinqService,False).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Octonica.LinqService,True).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Octonica.LinqService,False).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Octonica.LinqService,True).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Octonica.LinqService,False).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Octonica.LinqService,True).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Octonica.LinqService,False).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Octonica.LinqService,True).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Octonica.LinqService,False).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Octonica.LinqService,True).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Octonica.LinqService,False).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Octonica.LinqService,True).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(ClickHouse.Octonica.LinqService).sql create mode 100644 ClickHouse.Octonica/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(ClickHouse.Octonica).sql create mode 100644 ClickHouse.Octonica/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(ClickHouse.Octonica).sql create mode 100644 ClickHouse.Octonica/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(ClickHouse.Octonica).sql diff --git a/ClickHouse.Octonica.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..199a6af00672 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Data/InterceptorsTests/Tests.Data.InterceptorsTests.CloseEvents_DataConnection_Or_RemoteContext_Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + Person t1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..c8e62ff59036 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/AllAnyTests/Tests.Linq.AllAnyTests.All4Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID <= 3 + ) + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..0ba5f1f32d2e --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/AssociationTests/Tests.Linq.AssociationTests.GroupBy2Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + m_1.ParentID, + t2.ParentID_1, + t2.ChildID +FROM + ( + SELECT DISTINCT + a_Parent1.ParentID as ParentID + FROM + Child t1 + INNER JOIN Parent a_Parent1 ON t1.ParentID = a_Parent1.ParentID + ) m_1 + INNER JOIN ( + SELECT + a_Parent1_1.ParentID as ParentID, + d.ParentID as ParentID_1, + d.ChildID as ChildID + FROM + Child d + INNER JOIN Parent a_Parent1_1 ON d.ParentID = a_Parent1_1.ParentID + ) t2 ON m_1.ParentID = t2.ParentID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + a_Parent1.ParentID +FROM + Child t1 + INNER JOIN Parent a_Parent1 ON t1.ParentID = a_Parent1.ParentID +GROUP BY + a_Parent1.ParentID + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..7eb357fe1242 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable1Test(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..af8be47ab22d --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsAsyncEnumerable2Test(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID > 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..7eb357fe1242 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast1Test(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..af8be47ab22d --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.AsyncEnumerableCast2Test(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID > 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..84bc965284aa --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ContainsAsyncTest(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + CASE + WHEN 1 IN ( + SELECT + t1.PersonID + FROM + Person t1 + ) + THEN true + ELSE false + END + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..c083c7fcb118 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.FirstAsyncTest(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,15 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + p.FirstName, + p.PersonID, + p.LastName, + p.MiddleName, + p.Gender +FROM + Person p +WHERE + p.PersonID = 1 +LIMIT 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(ClickHouse.Octonica.LinqService).sql index eb52ddf12de5..1e9c5294371c 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TakeSkipTest(ClickHouse.Octonica.LinqService).sql @@ -10,3 +10,15 @@ ORDER BY t1.ParentID LIMIT 1, 2 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 +ORDER BY + t1.ParentID +LIMIT 1, 2 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..3277c1a37533 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestFirstOrDefault(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + o.ParentID, + o.Value1 +FROM + Parent o +WHERE + o.ParentID IN (1, 2, 3) OR o.ParentID = 4 +LIMIT 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..2ac46cecbafa --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupAsyncTest(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +ORDER BY + t1.ParentID, + t1.ChildID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..2ac46cecbafa --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.ToLookupElementAsyncTest(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,21 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +ORDER BY + t1.ParentID, + t1.ChildID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..24d636a290e3 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = 1 + ) + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = -1 + ) + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..24d636a290e3 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.AnyTestAsync2(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,26 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = 1 + ) + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + Child c_1 + WHERE + c_1.ParentID = -1 + ) + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..395ece97cdcb --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledQueryWithExpressionMethoAsyncdTest(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID = 1 +ORDER BY + x.ParentID DESC +LIMIT 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..4e7f071c341e --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CompiledTest3Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 1 +LIMIT 1 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 2 +LIMIT 2 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..6787325984e0 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ContainsTestAsync(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,30 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + CASE + WHEN 1 IN ( + SELECT + c_1.ParentID + FROM + Child c_1 + ) + THEN true + ELSE false + END + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + CASE + WHEN -1 IN ( + SELECT + c_1.ParentID + FROM + Child c_1 + ) + THEN true + ELSE false + END + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..b236e5436211 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = 1 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = -1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..b236e5436211 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.CountTestAsync2(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = 1 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ParentID = -1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..b393837c1426 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync1(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 1 +LIMIT 1 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 2 +LIMIT 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..b393837c1426 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.ElementTestAsync2(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 1 +LIMIT 1 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + c_1.ParentID, + c_1.ChildID +FROM + Child c_1 +WHERE + c_1.ParentID = 2 +LIMIT 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..cd5788165c5b --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = 1 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = -1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..cd5788165c5b --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTests/Tests.Linq.CompileTests.MaxTestAsync2(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = 1 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.ParentID) +FROM + Child c_1 +WHERE + c_1.ParentID = -1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..76165f10893e 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AllAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,13 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + NOT EXISTS( + SELECT + * + FROM + AsyncDataTable c_1 + WHERE + c_1.Id <> 2 + ) diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..c4a5c1a05418 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,13 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + AsyncDataTable c_1 + WHERE + c_1.Id = 2 + ) diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..c4a5c1a05418 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AnyPredicateAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,13 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + EXISTS( + SELECT + * + FROM + AsyncDataTable c_1 + WHERE + c_1.Id = 2 + ) diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..bdceb0bebb0f 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + avgOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..64dabe9366a1 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.ContainsAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,15 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + CASE + WHEN 2 IN ( + SELECT + c_1.Id + FROM + AsyncDataTable c_1 + ) + THEN true + ELSE false + END diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..505bce61d502 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..505bce61d502 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.CountPredicateAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..fc940c1e5121 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 1 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..fc940c1e5121 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 1 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..fc940c1e5121 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstOrDefaultPredicateAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 1 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..fc940c1e5121 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.FirstPredicateAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 1 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..505bce61d502 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..505bce61d502 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.LongCountPredicateAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..9de8971d76b0 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > 2 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..9de8971d76b0 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MaxSelectorAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + maxOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > 2 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..de429ffc9063 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + minOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > 2 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..de429ffc9063 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.MinSelectorAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + minOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id > 2 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..e6e6392505d1 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 2 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..e6e6392505d1 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 2 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..e6e6392505d1 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SingleOrDefaultPredicateAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 2 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..e6e6392505d1 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SinglePredicateAsync(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,12 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + 2, + c_1.Id +FROM + AsyncDataTable c_1 +WHERE + c_1.Id = 2 +LIMIT 2 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..d1bd018bac0f 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimal(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toDecimal128(c_1.Id, 10)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..d1bd018bac0f 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDecimalN(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toDecimal128(c_1.Id, 10)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..d171728dfc06 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDouble(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..d171728dfc06 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncDoubleN(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..b09e1453796e 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloat(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat32(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..b09e1453796e 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncFloatN(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat32(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..76d16c4361f9 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncInt(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..76d16c4361f9 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncIntN(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..1662c65f01dc 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..1662c65f01dc 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..d1bd018bac0f 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimal(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toDecimal128(c_1.Id, 10)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..d1bd018bac0f 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDecimalN(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toDecimal128(c_1.Id, 10)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..d171728dfc06 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDouble(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..d171728dfc06 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorDoubleN(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..b09e1453796e 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloat(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat32(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..b09e1453796e 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorFloatN(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toFloat32(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..76d16c4361f9 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorInt(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..76d16c4361f9 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorIntN(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(c_1.Id) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..1662c65f01dc 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(ClickHouse.Octonica.LinqService).sql index 0f3a40506fbe..1662c65f01dc 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(ClickHouse.Octonica.LinqService).sql @@ -1,142 +1,10 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS AsyncDataTable -( - Id Int32, - - PRIMARY KEY (Id) -) -ENGINE = MergeTree() -ORDER BY Id - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 1 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 2 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 3 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 4 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 5 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 6 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 7 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 8 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 9 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO AsyncDataTable -( - Id -) -VALUES -( - 10 -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS AsyncDataTable +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + sumOrNull(toInt64(c_1.Id)) +FROM + AsyncDataTable c_1 +WHERE + c_1.Id < 5 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..ef1f99f8bef4 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/ConcatUnionTests/Tests.Linq.ConcatUnionTests.Concat1Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID = 1 +UNION ALL +SELECT + p_1.ParentID as ParentID, + p_1.Value1 as Value1 +FROM + Parent p_1 +WHERE + p_1.ParentID = 2 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(ClickHouse.Octonica.LinqService).sql index 775c3f205877..731b00f084d8 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestAutoIncrementAsync(ClickHouse.Octonica.LinqService).sql @@ -1,4 +1,20 @@ BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +INSERT INTO ConcurrencyAutoIncrement +( + Id, + Stamp, + Value +) +VALUES +( + 1, + -10, + 'initial' +) + +BeforeExecute -- ClickHouse.Octonica ClickHouse SELECT @@ -8,6 +24,17 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +UPDATE + Stamp = Stamp + 1, + Value = 'value 1' +WHERE + Id = 1 AND Stamp = -10 + BeforeExecute -- ClickHouse.Octonica ClickHouse @@ -18,6 +45,17 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +UPDATE + Stamp = Stamp + 1, + Value = 'value 2' +WHERE + Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.Octonica ClickHouse @@ -28,6 +66,17 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +UPDATE + Stamp = Stamp + 1, + Value = 'value 3' +WHERE + Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.Octonica ClickHouse @@ -38,6 +87,14 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +DELETE WHERE + Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.Octonica ClickHouse @@ -48,6 +105,14 @@ SELECT FROM ConcurrencyAutoIncrement t1 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyAutoIncrement +DELETE WHERE + Id = 1 AND Stamp = -8 + BeforeExecute -- ClickHouse.Octonica ClickHouse diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(ClickHouse.Octonica.LinqService).sql index 9359a9e10d6c..ed5bd4f936ca 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/ConcurrencyTests/Tests.Linq.ConcurrencyTests.TestFilteredAsync(ClickHouse.Octonica.LinqService).sql @@ -1,4 +1,20 @@ BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +INSERT INTO ConcurrencyFiltered +( + Id, + Stamp, + Value +) +VALUES +( + 1, + -10, + 'initial' +) + +BeforeExecute -- ClickHouse.Octonica ClickHouse SELECT @@ -8,6 +24,17 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyFiltered +UPDATE + Stamp = Stamp + 1, + Value = 'value 1' +WHERE + Id = 2 AND Id = 1 AND Stamp = -10 + BeforeExecute -- ClickHouse.Octonica ClickHouse @@ -18,6 +45,17 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyFiltered +UPDATE + Stamp = Stamp + 1, + Value = 'value 2' +WHERE + Id = 1 AND Id = 1 AND Stamp = -10 + BeforeExecute -- ClickHouse.Octonica ClickHouse @@ -28,6 +66,14 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyFiltered +DELETE WHERE + Id = 2 AND Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.Octonica ClickHouse @@ -38,6 +84,14 @@ SELECT FROM ConcurrencyFiltered t1 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + ConcurrencyFiltered +DELETE WHERE + Id = 1 AND Id = 1 AND Stamp = -9 + BeforeExecute -- ClickHouse.Octonica ClickHouse diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..0e334854d1c0 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count1Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,8 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent t1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..769a59c1a522 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/CountTests/Tests.Linq.CountTests.Count2Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID > 2 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(ClickHouse.Octonica.LinqService).sql index 8a299c624b8e..e7591e69d835 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/DynamicColumnsTests/Tests.Linq.DynamicColumnsTests.Issue4602(ClickHouse.Octonica.LinqService).sql @@ -1,45 +1,11 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS DynamicParent - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS DynamicParent -( - ID Int32, - - PRIMARY KEY (ID) -) -ENGINE = MergeTree() -ORDER BY ID - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS DynamicChild - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS DynamicChild -( - ID Int32, - ParentID Int32, - - PRIMARY KEY (ID) -) -ENGINE = MergeTree() -ORDER BY ID - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS DynamicChild - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS DynamicParent +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + it.ID +FROM + DynamicParent it + LEFT JOIN DynamicChild a_Child ON it.ID = a_Child.ParentID +WHERE + a_Child.ID = 123 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(ClickHouse.Octonica.LinqService).sql index b6fc091723bb..e52699aa23b0 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async(ClickHouse.Octonica.LinqService).sql @@ -60,3 +60,34 @@ WHERE x.ParentID = 3 LIMIT 1 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + m_1.ParentID, + d.ParentID, + d.ChildID +FROM + ( + SELECT + x.ParentID as ParentID + FROM + Parent x + WHERE + x.ParentID = 3 + LIMIT 1 + ) m_1 + INNER JOIN Child d ON m_1.ParentID = d.ParentID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID = 3 +LIMIT 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(ClickHouse.Octonica.LinqService).sql index b6fc091723bb..e52699aa23b0 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/EagerLoadingTests/Tests.Linq.EagerLoadingTests.Issue4057_Async_ExplicitTransaction(ClickHouse.Octonica.LinqService).sql @@ -60,3 +60,34 @@ WHERE x.ParentID = 3 LIMIT 1 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + m_1.ParentID, + d.ParentID, + d.ChildID +FROM + ( + SELECT + x.ParentID as ParentID + FROM + Parent x + WHERE + x.ParentID = 3 + LIMIT 1 + ) m_1 + INNER JOIN Child d ON m_1.ParentID = d.ParentID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + x.ParentID, + x.Value1 +FROM + Parent x +WHERE + x.ParentID = 3 +LIMIT 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..0ebd548c4e15 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Cast1Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,11 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 +WHERE + t1.Value1 = 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..93b397311aec --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/InheritanceTests/Tests.Linq.InheritanceTests.Test18Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,13 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT DISTINCT + p1.PersonID, + p1.Gender, + p1.FirstName, + p1.LastName +FROM + Person p1 +WHERE + p1.PersonID IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) AND p1.Gender = 'F' + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..2190eadeb6b0 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/SelectScalarTests/Tests.Linq.SelectScalarTests.Parameter1Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,6 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..7ab2b6076ab0 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/SetOperatorTests/Tests.Linq.SetOperatorTests.Issue3132Test(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,213 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + x.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x +WHERE + x.MiddleName IS NOT NULL +GROUP BY + x.MiddleName +UNION ALL +SELECT + x_1.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_1 +WHERE + x_1.MiddleName IS NOT NULL +GROUP BY + x_1.MiddleName +UNION ALL +SELECT + x_2.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_2 +WHERE + x_2.MiddleName IS NOT NULL +GROUP BY + x_2.MiddleName +UNION ALL +SELECT + x_3.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_3 +WHERE + x_3.MiddleName IS NOT NULL +GROUP BY + x_3.MiddleName +UNION ALL +SELECT + x_4.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_4 +WHERE + x_4.MiddleName IS NOT NULL +GROUP BY + x_4.MiddleName +UNION ALL +SELECT + x_5.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_5 +WHERE + x_5.MiddleName IS NOT NULL +GROUP BY + x_5.MiddleName +UNION ALL +SELECT + x_6.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_6 +WHERE + x_6.MiddleName IS NOT NULL +GROUP BY + x_6.MiddleName +UNION ALL +SELECT + x_7.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_7 +WHERE + x_7.MiddleName IS NOT NULL +GROUP BY + x_7.MiddleName +UNION ALL +SELECT + x_8.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_8 +WHERE + x_8.MiddleName IS NOT NULL +GROUP BY + x_8.MiddleName +UNION ALL +SELECT + x_9.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_9 +WHERE + x_9.MiddleName IS NOT NULL +GROUP BY + x_9.MiddleName +UNION ALL +SELECT + x_10.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_10 +WHERE + x_10.MiddleName IS NOT NULL +GROUP BY + x_10.MiddleName +UNION ALL +SELECT + x_11.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_11 +WHERE + x_11.MiddleName IS NOT NULL +GROUP BY + x_11.MiddleName +UNION ALL +SELECT + x_12.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_12 +WHERE + x_12.MiddleName IS NOT NULL +GROUP BY + x_12.MiddleName +UNION ALL +SELECT + x_13.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_13 +WHERE + x_13.MiddleName IS NOT NULL +GROUP BY + x_13.MiddleName +UNION ALL +SELECT + x_14.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_14 +WHERE + x_14.MiddleName IS NOT NULL +GROUP BY + x_14.MiddleName +UNION ALL +SELECT + x_15.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_15 +WHERE + x_15.MiddleName IS NOT NULL +GROUP BY + x_15.MiddleName +UNION ALL +SELECT + x_16.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_16 +WHERE + x_16.MiddleName IS NOT NULL +GROUP BY + x_16.MiddleName +UNION ALL +SELECT + x_17.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_17 +WHERE + x_17.MiddleName IS NOT NULL +GROUP BY + x_17.MiddleName +UNION ALL +SELECT + x_18.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_18 +WHERE + x_18.MiddleName IS NOT NULL +GROUP BY + x_18.MiddleName +UNION ALL +SELECT + x_19.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_19 +WHERE + x_19.MiddleName IS NOT NULL +GROUP BY + x_19.MiddleName +UNION ALL +SELECT + x_20.MiddleName as Key_1, + COUNT(*) as Count_1 +FROM + Person x_20 +WHERE + x_20.MiddleName IS NOT NULL +GROUP BY + x_20.MiddleName + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Octonica.LinqService,False).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Octonica.LinqService,False).sql new file mode 100644 index 000000000000..e83a282829cb --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Octonica.LinqService,False).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID +LIMIT 3, 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Octonica.LinqService,True).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Octonica.LinqService,True).sql new file mode 100644 index 000000000000..e83a282829cb --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAt2Async(ClickHouse.Octonica.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID +LIMIT 3, 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Octonica.LinqService,False).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Octonica.LinqService,False).sql new file mode 100644 index 000000000000..e83a282829cb --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Octonica.LinqService,False).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID +LIMIT 3, 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Octonica.LinqService,True).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Octonica.LinqService,True).sql new file mode 100644 index 000000000000..e83a282829cb --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.ElementAtDefault3Async(ClickHouse.Octonica.LinqService,True).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p +WHERE + p.ParentID > 1 +ORDER BY + p.ParentID +LIMIT 3, 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(ClickHouse.Octonica.LinqService).sql index 7220927efd77..d7265b2269ed 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.MultipleSkip1Async(ClickHouse.Octonica.LinqService).sql @@ -1,67 +1,11 @@ BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS TakeSkipClass - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -CREATE TABLE IF NOT EXISTS TakeSkipClass -( - Value Nullable(String) -) -ENGINE = Memory() - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO TakeSkipClass -( - Value -) -VALUES -( - 'PLUTO' -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO TakeSkipClass -( - Value -) -VALUES -( - 'PIPPO' -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO TakeSkipClass -( - Value -) -VALUES -( - 'PLUTO' -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -INSERT INTO TakeSkipClass -( - Value -) -VALUES -( - 'BOLTO' -) - -BeforeExecute --- ClickHouse.Octonica ClickHouse - -DROP TABLE IF EXISTS TakeSkipClass +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.Value +FROM + TakeSkipClass t1 +ORDER BY + t1.Value +LIMIT 3, 18446744073709551615 diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Octonica.LinqService,False).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Octonica.LinqService,False).sql index 9d116e20e097..bacec3a09409 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Octonica.LinqService,False).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Octonica.LinqService,False).sql @@ -18,3 +18,23 @@ FROM Child ch LIMIT 3 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +LIMIT 2 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +LIMIT 3 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Octonica.LinqService,True).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Octonica.LinqService,True).sql index 9d116e20e097..bacec3a09409 100644 --- a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Octonica.LinqService,True).sql +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take1Async(ClickHouse.Octonica.LinqService,True).sql @@ -18,3 +18,23 @@ FROM Child ch LIMIT 3 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +LIMIT 2 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +LIMIT 3 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Octonica.LinqService,False).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Octonica.LinqService,False).sql new file mode 100644 index 000000000000..d4840243186d --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Octonica.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +LIMIT 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Octonica.LinqService,True).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Octonica.LinqService,True).sql new file mode 100644 index 000000000000..d4840243186d --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take2Async(ClickHouse.Octonica.LinqService,True).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +LIMIT 1 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Octonica.LinqService,False).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Octonica.LinqService,False).sql new file mode 100644 index 000000000000..4a552be17916 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Octonica.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID > 3 OR ch.ChildID < 4 +LIMIT 3 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Octonica.LinqService,True).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Octonica.LinqService,True).sql new file mode 100644 index 000000000000..4a552be17916 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take3Async(ClickHouse.Octonica.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID > 3 OR ch.ChildID < 4 +LIMIT 3 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Octonica.LinqService,False).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Octonica.LinqService,False).sql new file mode 100644 index 000000000000..5cdcb73e5a93 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Octonica.LinqService,False).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID >= 0 AND ch.ChildID <= 100 +LIMIT 3 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Octonica.LinqService,True).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Octonica.LinqService,True).sql new file mode 100644 index 000000000000..5cdcb73e5a93 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take4Async(ClickHouse.Octonica.LinqService,True).sql @@ -0,0 +1,12 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + ch.ParentID, + ch.ChildID +FROM + Child ch +WHERE + ch.ChildID >= 0 AND ch.ChildID <= 100 +LIMIT 3 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Octonica.LinqService,False).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Octonica.LinqService,False).sql new file mode 100644 index 000000000000..1d3c61bf62f6 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Octonica.LinqService,False).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +LIMIT 3 + diff --git a/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Octonica.LinqService,True).sql b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Octonica.LinqService,True).sql new file mode 100644 index 000000000000..1d3c61bf62f6 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/Linq/TakeSkipTests/Tests.Linq.TakeSkipTests.Take5Async(ClickHouse.Octonica.LinqService,True).sql @@ -0,0 +1,10 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 +LIMIT 3 + diff --git a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,False,False).sql b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,False,False).sql index d9f3695d2582..ded860a4020e 100644 --- a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,False,False).sql +++ b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,False,False).sql @@ -3,3 +3,21 @@ DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +CREATE TABLE Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,False,True).sql b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,False,True).sql index d9f3695d2582..ded860a4020e 100644 --- a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,False,True).sql +++ b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,False,True).sql @@ -3,3 +3,21 @@ DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +CREATE TABLE Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,True,False).sql b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,True,False).sql index 24183486a690..dc36b3f3ae7b 100644 --- a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,True,False).sql +++ b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,True,False).sql @@ -12,3 +12,21 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +CREATE TABLE testdb1.Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,True,True).sql b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,True,True).sql index 24183486a690..dc36b3f3ae7b 100644 --- a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,True,True).sql +++ b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,False,True,True).sql @@ -12,3 +12,21 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +CREATE TABLE testdb1.Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,False,False).sql b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,False,False).sql index d9f3695d2582..ded860a4020e 100644 --- a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,False,False).sql +++ b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,False,False).sql @@ -3,3 +3,21 @@ DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +CREATE TABLE Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,False,True).sql b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,False,True).sql index d9f3695d2582..ded860a4020e 100644 --- a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,False,True).sql +++ b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,False,True).sql @@ -3,3 +3,21 @@ DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +CREATE TABLE Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,True,False).sql b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,True,False).sql index 24183486a690..dc36b3f3ae7b 100644 --- a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,True,False).sql +++ b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,True,False).sql @@ -12,3 +12,21 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +CREATE TABLE testdb1.Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,True,True).sql b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,True,True).sql index 24183486a690..dc36b3f3ae7b 100644 --- a/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,True,True).sql +++ b/ClickHouse.Octonica.LinqService/Tests/UserTests/Issue681Tests/Tests.UserTests.Issue681Tests.TestCreateAsync(ClickHouse.Octonica.LinqService,True,True,True).sql @@ -12,3 +12,21 @@ BeforeExecute DROP TABLE IF EXISTS Issue681Table2 +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +CREATE TABLE testdb1.Issue681Table2 +( + ID Int32, + Value Int32, + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS Issue681Table2 + diff --git a/ClickHouse.Octonica.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..2a7fa32eeaae --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/xUpdate/CreateTableTests/Tests.xUpdate.CreateTableTests.CreateTable1Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS TestTable + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +CREATE TABLE TestTable +( + ID Int32, + Field1 Nullable(String), + Field2 Nullable(String), + CreatedOn Nullable(DateTime64(7)), + + PRIMARY KEY (ID) +) +ENGINE = MergeTree() +ORDER BY ID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ID, + t1.Field1, + t1.Field2, + t1.CreatedOn +FROM + TestTable t1 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE TestTable + diff --git a/ClickHouse.Octonica.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(ClickHouse.Octonica.LinqService).sql index e431fc42c7d6..8d3a598c6a05 100644 --- a/ClickHouse.Octonica.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsync(ClickHouse.Octonica.LinqService).sql @@ -1,4 +1,30 @@ BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS TempTable + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +CREATE TABLE IF NOT EXISTS TempTable +( + ID Int32 +) +ENGINE = Memory() + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +INSERT INTO TempTable +( + ID +) +SELECT + p.ParentID +FROM + Parent p + +BeforeExecute -- ClickHouse.Octonica ClickHouse SELECT @@ -7,3 +33,8 @@ FROM Parent p INNER JOIN TempTable t ON p.ParentID = t.ID +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS TempTable + diff --git a/ClickHouse.Octonica.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..8e85c653d7b0 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/xUpdate/DeleteTests/Tests.xUpdate.DeleteTests.DeleteByTableNameAsync(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,83 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS xxPerson + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +CREATE TABLE xxPerson +( + FirstName String, + PersonID Int32, + LastName String, + MiddleName Nullable(String), + Gender FixedString(1), + + PRIMARY KEY (PersonID) +) +ENGINE = MergeTree() +ORDER BY PersonID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +INSERT INTO xxPerson +( + FirstName, + PersonID, + LastName, + MiddleName, + Gender +) +VALUES +( + 'Steven', + 0, + 'King', + NULL, + 'M' +) + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson t1 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + xxPerson t1 +LIMIT 2 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + xxPerson +DELETE WHERE + PersonID = 0 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson t1 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE xxPerson + diff --git a/ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..1c2ca68a741e --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert2Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,40 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +INSERT INTO Child +( + ParentID, + ChildID +) +VALUES +( + 1, + 1001 +) + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ChildID = 1001 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + diff --git a/ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..02844f6232a4 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert3Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,42 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +INSERT INTO Child +( + ParentID, + ChildID +) +SELECT + c_1.ParentID, + 1001 +FROM + Child c_1 +WHERE + c_1.ChildID = 11 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ChildID = 1001 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + diff --git a/ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..02844f6232a4 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.Insert4Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,42 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +INSERT INTO Child +( + ParentID, + ChildID +) +SELECT + c_1.ParentID, + 1001 +FROM + Child c_1 +WHERE + c_1.ChildID = 11 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Child c_1 +WHERE + c_1.ChildID = 1001 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + Child +DELETE WHERE + ChildID > 1000 + diff --git a/ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..1a1cfb86f071 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertByTableNameAsync(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +CREATE TABLE xxPerson +( + FirstName String, + PersonID Int32, + LastName String, + MiddleName Nullable(String), + Gender FixedString(1), + + PRIMARY KEY (PersonID) +) +ENGINE = MergeTree() +ORDER BY PersonID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +INSERT INTO xxPerson +( + FirstName, + PersonID, + LastName, + MiddleName, + Gender +) +VALUES +( + 'Steven', + 0, + 'King', + NULL, + 'M' +) + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE xxPerson + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS xxPerson + diff --git a/ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..f6c2ece1f058 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update1Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +INSERT INTO Parent +( + ParentID, + Value1 +) +VALUES +( + 1001, + 1001 +) + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = 1001 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + Parent +UPDATE + ParentID = ParentID + 1 +WHERE + ParentID = 1001 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = 1002 + diff --git a/ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..f6c2ece1f058 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.Update2Async(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +INSERT INTO Parent +( + ParentID, + Value1 +) +VALUES +( + 1001, + 1001 +) + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = 1001 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + Parent +UPDATE + ParentID = ParentID + 1 +WHERE + ParentID = 1001 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + Parent p +WHERE + p.ParentID = 1002 + diff --git a/ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(ClickHouse.Octonica.LinqService).sql new file mode 100644 index 000000000000..ce24d3179555 --- /dev/null +++ b/ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateByTableNameAsync(ClickHouse.Octonica.LinqService).sql @@ -0,0 +1,93 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE IF EXISTS xxPerson + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +CREATE TABLE xxPerson +( + FirstName String, + PersonID Int32, + LastName String, + MiddleName Nullable(String), + Gender FixedString(1), + + PRIMARY KEY (PersonID) +) +ENGINE = MergeTree() +ORDER BY PersonID + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +INSERT INTO xxPerson +( + FirstName, + PersonID, + LastName, + MiddleName, + Gender +) +VALUES +( + 'Steven', + 0, + 'King', + NULL, + 'M' +) + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + COUNT(*) +FROM + xxPerson t1 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + xxPerson t1 +LIMIT 2 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + xxPerson +UPDATE + FirstName = 'Steven', + LastName = 'King', + MiddleName = 'None', + Gender = 'M' +WHERE + PersonID = 0 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.FirstName, + t1.PersonID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + xxPerson t1 +LIMIT 2 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +DROP TABLE xxPerson + diff --git a/ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(ClickHouse.Octonica.LinqService).sql b/ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(ClickHouse.Octonica.LinqService).sql index 50b2a9fe2d47..93cf292bfb63 100644 --- a/ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(ClickHouse.Octonica.LinqService).sql +++ b/ClickHouse.Octonica.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateComplex1Async(ClickHouse.Octonica.LinqService).sql @@ -18,3 +18,46 @@ VALUES 'Empty' ) +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.PersonID, + t1.Gender, + t1.FirstName, + t1.MiddleName, + t1.LastName +FROM + Person t1 +WHERE + t1.PersonID = 100 +LIMIT 1 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +ALTER TABLE + Person +UPDATE + Gender = 'M', + FirstName = 'UpdateComplex', + MiddleName = NULL, + LastName = 'UpdateComplex' +WHERE + PersonID = 100 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.PersonID, + t1.Gender, + t1.FirstName, + t1.MiddleName, + t1.LastName +FROM + Person t1 +WHERE + t1.PersonID = 100 +LIMIT 1 + diff --git a/ClickHouse.Octonica/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(ClickHouse.Octonica).sql b/ClickHouse.Octonica/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(ClickHouse.Octonica).sql new file mode 100644 index 000000000000..f8b7c8c731e2 --- /dev/null +++ b/ClickHouse.Octonica/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test(ClickHouse.Octonica).sql @@ -0,0 +1,18 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/ClickHouse.Octonica/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(ClickHouse.Octonica).sql b/ClickHouse.Octonica/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(ClickHouse.Octonica).sql new file mode 100644 index 000000000000..7eb357fe1242 --- /dev/null +++ b/ClickHouse.Octonica/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.Test1(ClickHouse.Octonica).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + diff --git a/ClickHouse.Octonica/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(ClickHouse.Octonica).sql b/ClickHouse.Octonica/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(ClickHouse.Octonica).sql new file mode 100644 index 000000000000..7eb357fe1242 --- /dev/null +++ b/ClickHouse.Octonica/Tests/Linq/AsyncTests/Tests.Linq.AsyncTests.TestForEach(ClickHouse.Octonica).sql @@ -0,0 +1,9 @@ +BeforeExecute +-- ClickHouse.Octonica ClickHouse (asynchronously) + +SELECT + t1.ParentID, + t1.Value1 +FROM + Parent t1 + From 1dbc72b5c380160e8b87d8499a5c99cf7c1503d6 Mon Sep 17 00:00:00 2001 From: Azure Pipelines Bot Date: Sun, 23 Feb 2025 04:20:24 +0000 Subject: [PATCH 40/40] [Linux / PostgreSQL 17] baselines --- ...servedAndCaseNamesFromList(PostgreSQL.17.LinqService).sql | 5 +++-- ...servedAndCaseNamesFromList(PostgreSQL.17.LinqService).sql | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.InsertReservedAndCaseNamesFromList(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.InsertReservedAndCaseNamesFromList(PostgreSQL.17.LinqService).sql index 81c091a6af25..cd243981e483 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.InsertReservedAndCaseNamesFromList(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.InsertReservedAndCaseNamesFromList(PostgreSQL.17.LinqService).sql @@ -236,8 +236,9 @@ BeforeExecute MERGE INTO "TestMerge1" "Target" USING (VALUES - (5,10,4,NULL::Int,NULL,NULL::Int), (3,NULL,3,NULL,NULL,NULL), - (4,5,7,NULL,214,NULL), (6,NULL,NULL,NULL,216,NULL) + (3,NULL,3,NULL::Int,NULL,NULL::Int), + (4,5,7,NULL,214,NULL), (5,10,4,NULL,NULL,NULL), + (6,NULL,NULL,NULL,216,NULL) ) "Source" ( source_as, diff --git a/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.UpdateBySourceReservedAndCaseNamesFromList(PostgreSQL.17.LinqService).sql b/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.UpdateBySourceReservedAndCaseNamesFromList(PostgreSQL.17.LinqService).sql index d1bf36af471f..66bedf60aecb 100644 --- a/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.UpdateBySourceReservedAndCaseNamesFromList(PostgreSQL.17.LinqService).sql +++ b/PostgreSQL.17.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.UpdateBySourceReservedAndCaseNamesFromList(PostgreSQL.17.LinqService).sql @@ -236,7 +236,7 @@ BeforeExecute MERGE INTO "TestMerge1" "Target" USING (VALUES - (6), (3), (4), (5) + (5), (6), (4), (3) ) "Source" ( "source_From"